Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/dialects/postgres.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ export class PostgresParser extends BaseDatabaseParser {
where attrelid = c.conrelid and ARRAY[attnum] <@ c.conkey) as col,
(select r.relname from pg_class r where r.oid = c.confrelid) as referenced_table
from pg_constraint c
where c.conrelid = (select oid from pg_class where relname = '${table}')
where c.conrelid = (select oid from pg_class where relname = '${table}' and relnamespace =
(select oid from pg_namespace where nspname = '${schemaName}'))
and (select r.relname from pg_class r where r.oid = c.confrelid) is not null
`);

Expand Down