From ab2f3305e1a14c63ed25a7f6ef0d9ae2b6187c48 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Fri, 13 May 2016 17:46:24 -0400 Subject: [PATCH] Ignore InvalidCatalogName errors for pg_catalog queries --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7b86f4ea..8c2d2fbd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -421,6 +421,8 @@ impl InnerConnection { Err(Error::Io(e)) => return Err(ConnectError::Io(e)), // Old versions of Postgres and things like Redshift don't support enums Err(Error::Db(ref e)) if e.code == SqlState::UndefinedTable => {} + // Some Postgres compliant databases are missing a pg_catalog + Err(Error::Db(ref e)) if e.code == SqlState::InvalidCatalogName => return Ok(()), Err(Error::Db(e)) => return Err(ConnectError::Db(e)), Err(Error::Conversion(_)) => unreachable!(), }