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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: zam6ak(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 21:54:45
Message-ID: CAKFQuwaaJLpiHKCj7W8FS6rwmd2YgyNYbnA2qyMeM+ukKnN=hA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message zambak zambak 2017-09-12 22:01:38 Re: BUG #14813: pg_get_serial_sequence does not return seqence name for IDENTITY columns
Previous Message zam6ak 2017-09-12 21:20:54 BUG #14813: pg_get_serial_sequence does not return seqence name for IDENTITY columns