mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
To retrieve a column default value, prefer pg_attrdef.adbin column over pg_attrdef.adsrc. PostgreSQL 12 does not have adsrc. Closes #763
This commit is contained in:
@@ -2854,7 +2854,7 @@ begin
|
||||
' FORMAT_TYPE(a.atttypid, a.atttypmod) AS data_type, '+
|
||||
' CASE a.attnotnull WHEN false THEN '+EscapeString('YES')+' ELSE '+EscapeString('NO')+' END AS IS_NULLABLE, '+
|
||||
' com.description AS column_comment, '+
|
||||
' def.adsrc AS column_default, '+
|
||||
' pg_get_expr(def.adbin, def.adrelid) AS column_default, '+
|
||||
' NULL AS character_maximum_length '+
|
||||
'FROM pg_attribute AS a '+
|
||||
'JOIN pg_class AS pgc ON pgc.oid = a.attrelid '+
|
||||
|
||||
Reference in New Issue
Block a user