Fix startup logic for old Postgres versions

Closes #167
This commit is contained in:
Steven Fackler
2016-03-30 21:31:33 -07:00
parent 3cd6b4d821
commit 96b1f7b7f7

View File

@@ -471,6 +471,8 @@ impl InnerConnection {
ORDER BY enumsortorder") {
Ok(..) => {}
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 => {}
Err(Error::Db(e)) => return Err(ConnectError::Db(e)),
Err(Error::Conversion(_)) => unreachable!(),
}
@@ -484,6 +486,8 @@ impl InnerConnection {
ORDER BY attnum") {
Ok(..) => {}
Err(Error::Io(e)) => return Err(ConnectError::Io(e)),
// Old versions of Postgres and things like Redshift don't support composites
Err(Error::Db(ref e)) if e.code == SqlState::UndefinedTable => {}
Err(Error::Db(e)) => return Err(ConnectError::Db(e)),
Err(Error::Conversion(_)) => unreachable!(),
}