Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodoc fails on PostgreSQL 12 #19

Closed
cbbrowne opened this issue Mar 3, 2020 · 1 comment
Closed

Autodoc fails on PostgreSQL 12 #19

cbbrowne opened this issue Mar 3, 2020 · 1 comment

Comments

@cbbrowne
Copy link
Owner

cbbrowne commented Mar 3, 2020

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 pushed a commit that referenced this issue Mar 3, 2020
@cbbrowne
Copy link
Owner Author

cbbrowne commented Mar 3, 2020

FYI, I looked back as far as PostgreSQL 8.4; the above function exists that far back, so this should be nicely backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant