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 @@ -1136,12 +1136,13 @@ check_for_not_null_inheritance(ClusterInfo *cluster)
1136
1136
PGconn * conn = connectToServer (& old_cluster , active_db -> db_name );
1137
1137
1138
1138
res = executeQueryOrDie (conn ,
1139
- "SELECT cc.relnamespace::pg_catalog.regnamespace AS nspname, "
1140
- " cc.relname, ac.attname "
1139
+ "SELECT nspname, cc.relname, ac.attname "
1141
1140
"FROM pg_catalog.pg_inherits i, pg_catalog.pg_attribute ac, "
1142
- " pg_catalog.pg_attribute ap, pg_catalog.pg_class cc "
1141
+ " pg_catalog.pg_attribute ap, pg_catalog.pg_class cc, "
1142
+ " pg_catalog.pg_namespace nc "
1143
1143
"WHERE cc.oid = ac.attrelid AND i.inhrelid = ac.attrelid "
1144
1144
" AND i.inhparent = ap.attrelid AND ac.attname = ap.attname "
1145
+ " AND cc.relnamespace = nc.oid "
1145
1146
" AND ap.attnum > 0 and ap.attnotnull AND NOT ac.attnotnull" );
1146
1147
1147
1148
ntup = PQntuples (res );
You can’t perform that action at this time.
0 commit comments