Project

General

Profile

« Previous | Next » 

Revision 6903

sql.py: DbConn.col_info(): Fixed bug where need to use pg_get_expr() on pg_attrdef.adbin instead of shortcut field adsrc, because adsrc does not include schema qualifiers on table names (including strings passed to `nextval('..._seq'::regclass)`)

View differences:

lib/sql.py
478 478
SELECT
479 479
format_type(COALESCE(NULLIF(typelem, 0), pg_type.oid), -1) AS type
480 480
, typcategory = 'A' AS type_is_array
481
, pg_attrdef.adsrc AS default
481
, pg_get_expr(pg_attrdef.adbin, attrelid, true) AS default
482 482
, NOT pg_attribute.attnotnull AS nullable
483 483
FROM pg_attribute
484 484
LEFT JOIN pg_type ON pg_type.oid = atttypid

Also available in: Unified diff