We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b82a013 commit 59652a7Copy full SHA for 59652a7
src/dialects/postgres.parser.ts
@@ -171,7 +171,8 @@ export class PostgresParser extends BaseDatabaseParser {
171
where attrelid = c.conrelid and ARRAY[attnum] <@ c.conkey) as col,
172
(select r.relname from pg_class r where r.oid = c.confrelid) as referenced_table
173
from pg_constraint c
174
- where c.conrelid = (select oid from pg_class where relname = '${table}')
+ where c.conrelid = (select oid from pg_class where relname = '${table}' and relnamespace =
175
+ (select oid from pg_namespace where nspname = '${schemaName}'))
176
and (select r.relname from pg_class r where r.oid = c.confrelid) is not null
177
`);
178
0 commit comments