Autodoc fails on PostgreSQL 12
cbbrowne opened this issue · 1 comments
cbbrowne commented
postgresql_autodoc -h localhost -u postgres -p 7012 -d mydb
when pointed at PostgreSQL 12
generates a bunch of messages of the form...
DBD::Pg::st execute failed: ERROR: column "adsrc" does not exist
LINE 40: adsrc
^ at /usr/local/bin/postgresql_autodoc line 695.
The cause is documented in the PostgreSQL 12 release notes:
Remove obsolete pg_attrdef.adsrc column (Peter Eisentraut)
This column has been deprecated for a long time, because it did not update in response to other catalog changes (such as column renamings). The recommended way to get a text version of a default-value expression from pg_attrdef is pg_get_expr(adbin, adrelid).
cbbrowne commented
FYI, I looked back as far as PostgreSQL 8.4; the above function exists that far back, so this should be nicely backwards compatible.