@@ -205,9 +228,17 @@ class ConnectionManager extends AbstractConnectionManager {
...
@@ -205,9 +228,17 @@ class ConnectionManager extends AbstractConnectionManager {
}
}
// Refresh dynamic OIDs for some types
// Refresh dynamic OIDs for some types
// These include, Geometry / HStore / Enum / Citext
// These include Geometry / Geography / HStore / Enum / Citext / Range
return(connection||this.sequelize).query(
return(connection||this.sequelize).query(
"SELECT typname, typtype, oid, typarray FROM pg_type WHERE (typtype = 'b' AND typname IN ('hstore', 'geometry', 'geography', 'citext')) OR (typtype = 'e')"
'WITH ranges AS ('+
' SELECT pg_range.rngtypid, pg_type.typname AS rngtypname,'+
' pg_type.typarray AS rngtyparray, pg_range.rngsubtype'+
' FROM pg_range LEFT OUTER JOIN pg_type ON pg_type.oid = pg_range.rngtypid'+