File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1239,12 +1239,13 @@ check_for_not_null_inheritance(ClusterInfo *cluster)
1239
1239
PGconn * conn = connectToServer (& old_cluster , active_db -> db_name );
1240
1240
1241
1241
res = executeQueryOrDie (conn ,
1242
- "SELECT cc.relnamespace::pg_catalog.regnamespace AS nspname, "
1243
- " cc.relname, ac.attname "
1242
+ "SELECT nspname, cc.relname, ac.attname "
1244
1243
"FROM pg_catalog.pg_inherits i, pg_catalog.pg_attribute ac, "
1245
- " pg_catalog.pg_attribute ap, pg_catalog.pg_class cc "
1244
+ " pg_catalog.pg_attribute ap, pg_catalog.pg_class cc, "
1245
+ " pg_catalog.pg_namespace nc "
1246
1246
"WHERE cc.oid = ac.attrelid AND i.inhrelid = ac.attrelid "
1247
1247
" AND i.inhparent = ap.attrelid AND ac.attname = ap.attname "
1248
+ " AND cc.relnamespace = nc.oid "
1248
1249
" AND ap.attnum > 0 and ap.attnotnull AND NOT ac.attnotnull" );
1249
1250
1250
1251
ntup = PQntuples (res );
You can’t perform that action at this time.
0 commit comments