We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e151c68 commit fd02a60Copy full SHA for fd02a60
1 file changed
crates/pgt_schema_cache/src/queries/columns.sql
@@ -52,10 +52,10 @@ from
52
and atts.attnum = ix.attnum
53
left join pg_catalog.pg_attrdef def on atts.attrelid = def.adrelid
54
and atts.attnum = def.adnum
55
- left join pg_catalog.pg_type tps on tps.oid = atts.atttypid
+ left join pg_catalog.pg_type tps on atts.atttypid = tps.oid
56
where
57
-- system columns, such as `cmax` or `tableoid`, have negative `attnum`s
58
- atts.attnum >= 0 and atts.atttypid != null
+ atts.attnum >= 0 and atts.atttypid is not null and tps.oid is not null
59
order by
60
schema_name desc,
61
table_name,
0 commit comments