diff options
Diffstat (limited to 'python/skytools')
-rw-r--r-- | python/skytools/dbstruct.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/skytools/dbstruct.py b/python/skytools/dbstruct.py index f75a0552..13c0fbd1 100644 --- a/python/skytools/dbstruct.py +++ b/python/skytools/dbstruct.py @@ -328,7 +328,7 @@ class TColumn(TElem): a.attname || ' ' || format_type(a.atttypid, a.atttypmod) || case when a.attnotnull then ' not null' else '' end - || case when a.atthasdef then ' default ' || d.adsrc else '' end + || case when a.atthasdef then ' default ' || pg_get_expr(d.adbin, d.adrelid) else '' end as def, pg_get_serial_sequence(%(fq2name)s, a.attname) as seqname from pg_attribute a left join pg_attrdef d |