public inbox for [email protected]
help / color / mirror / Atom feedFrom: Christoph Moench-Tegeder <[email protected]>
To: Matt Zagrabelny <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: adsrc
Date: Tue, 5 Nov 2024 23:22:15 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOLfK3U80_x7V1w_t2tJFMVPhgKMXz1YmpAzEGDkstquBwW0LA@mail.gmail.com>
References: <CAOLfK3U80_x7V1w_t2tJFMVPhgKMXz1YmpAzEGDkstquBwW0LA@mail.gmail.com>
## Matt Zagrabelny ([email protected]):
> 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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: adsrc
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox