Remove obsolete pg_attrdef.adsrc column

Started by Peter Eisentrautover 7 years ago6 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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
#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Peter Eisentraut (#1)
Re: Remove obsolete pg_attrdef.adsrc column

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

#3Daniel Gustafsson
daniel@yesql.se
In reply to: Peter Eisentraut (#1)
Re: Remove obsolete pg_attrdef.adsrc column

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
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Daniel Gustafsson (#3)
Re: Remove obsolete pg_attrdef.adsrc column

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:

v2-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
#5Daniel Gustafsson
daniel@yesql.se
In reply to: Peter Eisentraut (#4)
Re: Remove obsolete pg_attrdef.adsrc column

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

#6Peter Eisentraut
peter_e@gmx.net
In reply to: Daniel Gustafsson (#5)
Re: Remove obsolete pg_attrdef.adsrc column

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