Skip to content

Commit fd02a60

Browse files
ok
1 parent e151c68 commit fd02a60

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/pgt_schema_cache/src/queries/columns.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ from
5252
and atts.attnum = ix.attnum
5353
left join pg_catalog.pg_attrdef def on atts.attrelid = def.adrelid
5454
and atts.attnum = def.adnum
55-
left join pg_catalog.pg_type tps on tps.oid = atts.atttypid
55+
left join pg_catalog.pg_type tps on atts.atttypid = tps.oid
5656
where
5757
-- system columns, such as `cmax` or `tableoid`, have negative `attnum`s
58-
atts.attnum >= 0 and atts.atttypid != null
58+
atts.attnum >= 0 and atts.atttypid is not null and tps.oid is not null
5959
order by
6060
schema_name desc,
6161
table_name,

0 commit comments

Comments
 (0)