Re: BUG #14813: pg_get_serial_sequence does not return seqence name for IDENTITY columns

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, zam6ak(at)gmail(dot)com, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14813: pg_get_serial_sequence does not return seqence name for IDENTITY columns
Date: 2017-09-15 18:31:23
Message-ID: be99f778-2c0b-87d6-3772-008d8ac8e9e7@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 9/14/17 17:15, Peter Eisentraut wrote:
> On 9/13/17 09:25, Alvaro Herrera wrote:
>> Tom Lane wrote:
>>> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>>
>>>> ​I suspect this is an opportunity for documentation enhancement as opposed
>>>> to a bug.
>>>
>>> The reason appears to be that the dependency setup for a sequence created
>>> to support IDENTITY is randomly different from that for a serial sequence.
>>> I'm not sure this is a good thing.
>>
>> It would be bad to break queries all over the internet that assume that
>> sequences for columns can be found using pg_get_serial_sequence, so I
>> agree this should be fixed.
>
> Proposed patch attached.

committed

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-09-15 19:26:35 Re: BUG #14808: V10-beta4, backend abort
Previous Message John R Pierce 2017-09-15 18:15:47 Re: Urgent! PGWatch issue