From: | zambak zambak <zam6ak(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "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-12 22:01:38 |
Message-ID: | CAEy4EGV+xz06Oh82scx4oDeuoM_9N=RV748X0xs5_9L2Qnpx1w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Sep 12, 2017 at 5:54 PM, David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Tue, Sep 12, 2017 at 2:20 PM, <zam6ak(at)gmail(dot)com> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference: 14813
>> Logged by: zam zam
>> Email address: zam6ak(at)gmail(dot)com
>> PostgreSQL version: 10beta4
>> Operating system: windows
>> Description:
>>
>> Function pg_get_serial_sequence returns NULL on columns defined as
>> IDENTITY
>>
>> CREATE TABLE IF NOT EXISTS public.test (
>> id bigint NOT NULL GENERATED ALWAYS AS IDENTITY,
>> code text,
>>
>> CONSTRAINT test_pk PRIMARY KEY (id)
>> )
>>
>> SELECT pg_get_serial_sequence('public.test', 'id'); -- returns NULL
>> instead
>> of 'test_id_seq'!
>>
>
> I suspect this is an opportunity for documentation enhancement as opposed
> to a bug.
>
> The CREATE TABLE docs say that: "It will have an implicit sequence
> attached to it." I take the word "implicit" to mean that an actual
> external sequence object is not created.
>
> David J.
>
But the sequence 'test_id_seq' is created....
To my understanding (and I may be wrong), identity columns are backed by
sequences in PG 10...
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2017-09-12 22:31:20 | Re: [BUGS] BUG #14795: date format not ISO 8601 |
Previous Message | David G. Johnston | 2017-09-12 21:54:45 | Re: BUG #14813: pg_get_serial_sequence does not return seqence name for IDENTITY columns |