gdb pgsql skip dropped fields

This commit is contained in:
qinyuguang
2022-01-13 14:20:01 +08:00
parent 6ded700f92
commit eaeb8e03ab

View File

@ -158,7 +158,7 @@ FROM pg_attribute a
left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid
left join pg_type t ON a.atttypid = t.oid
left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname
WHERE c.relname = '%s' and a.attnum > 0
WHERE c.relname = '%s' and a.attisdropped is false and a.attnum > 0
ORDER BY a.attnum`,
strings.ToLower(table),
)