From: | Christoph Moench-Tegeder <cmt(at)burggraben(dot)net> |
---|---|
To: | Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu> |
Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: adsrc |
Date: | 2024-11-05 22:22:15 |
Message-ID: | Zyqal6ZAUoI81Jne@elch.exwg.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
## Matt Zagrabelny (mzagrabe(at)d(dot)umn(dot)edu):
> I'd like to upgrade the database to Pg 15, but when I connect and perform
> some tasks in the app, I get:
>
> ERROR: column d.adsrc does not exist at character 331
That pg_attrdef.adsrc was already marked as "historical, and is best
not used" in 9.4: https://www.postgresql.org/docs/9.4/catalog-pg-attrdef.html
(In fact, that notice was added in 8.0).
The official way to get the human-readable representation of the
column's default value is "pg_get_expr(d.adbin, d.adrelid)" (use that
instead of d.adsrc) - that way the fix is rather straight-forward.
Documentation on pg_get_expr() is in this table:
https://www.postgresql.org/docs/15/functions-info.html#FUNCTIONS-INFO-CATALOG-TABLE
Regards,
Christoph
--
Spare Space
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2024-11-05 22:31:13 | Re: adsrc |
Previous Message | David Rowley | 2024-11-05 22:11:51 | Re: Why not do distinct before SetOp |