Remove obsolete pg_attrdef.adsrc column
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t39552psql -h localhost -U postgresBuilt from patchset v4 (message #4), July 28, 2026 at 05:02 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t39552_4 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t39552_4 && git checkout t39552_4Patchset v4 (message #4) is on t39552_4
I propose the attached patch to remove the long-unused catalog column
pg_attrdef.adsrc.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
0001-Remove-obsolete-pg_attrdef.adsrc-column.patchtext/plain; charset=UTF-8; name=0001-Remove-obsolete-pg_attrdef.adsrc-column.patch; x-mac-creator=0; x-mac-type=0Download+0-30
On 2018-Oct-23, Peter Eisentraut wrote:
I propose the attached patch to remove the long-unused catalog column
pg_attrdef.adsrc.
+1, looks good. I think this change has been waiting for a very long
time -- documented as useless by 81c41e3d0ed3 (Jan 2005, general doc
copy-edit, a paragraph you're now removing).
Interestingly, it seems pg_dump stopped relying on that column as a
side-effect of 9f0ae0c82060 (May 2002, "First pass at schema-fying
pg_dump/pg_restore"); adsrc remained used for 7.1 and older only, which
was removed afterwards.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
On 23 Oct 2018, at 15:17, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
I propose the attached patch to remove the long-unused catalog column
pg_attrdef.adsrc.
+1, I ran into a bug in an app as recently as today where adsrc was used
instead of pg_get_expr().
Patch looks good. I probably would’ve opted for mentioning how to get a human
readable version on the page, along the lines of the attached version, but I
may be biased from having dealt with apps that need just that.
cheers ./daniel
Attachments:
petere-attrdef_adsrc_remove.diffapplication/octet-stream; name=petere-attrdef_adsrc_remove.diff; x-unix-mode=0644Download+7-29
On 23/10/2018 19:48, Daniel Gustafsson wrote:
On 23 Oct 2018, at 15:17, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
I propose the attached patch to remove the long-unused catalog column
pg_attrdef.adsrc.+1, I ran into a bug in an app as recently as today where adsrc was used
instead of pg_get_expr().Patch looks good. I probably would’ve opted for mentioning how to get a human
readable version on the page, along the lines of the attached version,
Agreed. I have integrated your suggestion.
Also, let's go nuts and remove pg_constraint.consrc as well.
Updated patches attached.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
t39552_4v2-0001-Remove-obsolete-pg_attrdef.adsrc-column.patchtext/plain; charset=UTF-8; name=v2-0001-Remove-obsolete-pg_attrdef.adsrc-column.patch; x-mac-creator=0; x-mac-type=0Download+3-31
v2-0002-Remove-obsolete-pg_constraint.consrc-column.patchtext/plain; charset=UTF-8; name=v2-0002-Remove-obsolete-pg_constraint.consrc-column.patch; x-mac-creator=0; x-mac-type=0Download+24-79
On 27 Oct 2018, at 12:57, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 23/10/2018 19:48, Daniel Gustafsson wrote:
On 23 Oct 2018, at 15:17, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
I propose the attached patch to remove the long-unused catalog column
pg_attrdef.adsrc.+1, I ran into a bug in an app as recently as today where adsrc was used
instead of pg_get_expr().Patch looks good. I probably would’ve opted for mentioning how to get a human
readable version on the page, along the lines of the attached version,Agreed. I have integrated your suggestion.
Also, let's go nuts and remove pg_constraint.consrc as well.
No objections from me.
Updated patches attached.
+1, applies and works as intended.
cheers ./daniel
On 27/10/2018 23:19, Daniel Gustafsson wrote:
On 27 Oct 2018, at 12:57, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 23/10/2018 19:48, Daniel Gustafsson wrote:
On 23 Oct 2018, at 15:17, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
I propose the attached patch to remove the long-unused catalog column
pg_attrdef.adsrc.+1, I ran into a bug in an app as recently as today where adsrc was used
instead of pg_get_expr().Patch looks good. I probably would’ve opted for mentioning how to get a human
readable version on the page, along the lines of the attached version,Agreed. I have integrated your suggestion.
Also, let's go nuts and remove pg_constraint.consrc as well.
No objections from me.
Updated patches attached.
+1, applies and works as intended.
Committed, thanks.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services