Обсуждение: Remove obsolete pg_attrdef.adsrc column

Поиск
Список
Период
Сортировка

Remove obsolete pg_attrdef.adsrc column

От
Peter Eisentraut
Дата:
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

Вложения

Re: Remove obsolete pg_attrdef.adsrc column

От
Alvaro Herrera
Дата:
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


Re: Remove obsolete pg_attrdef.adsrc column

От
Daniel Gustafsson
Дата:
> 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


Вложения

Re: Remove obsolete pg_attrdef.adsrc column

От
Peter Eisentraut
Дата:
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

Вложения

Re: Remove obsolete pg_attrdef.adsrc column

От
Daniel Gustafsson
Дата:
> 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


Re: Remove obsolete pg_attrdef.adsrc column

От
Peter Eisentraut
Дата:
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