pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Euler Taveira <euler@timbira.com.br>
To: Francisco Olarte <folarte@peoplecall.com>
Cc: José Luis Viejo <jlviejo@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: identity not working with inherited table
Date: Mon, 13 May 2019 18:28:01 +0200
Message-ID: <0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com> (raw)
In-Reply-To: <CAHE3wghjY7HOxVBSoy3MQAS87L-63d12REvatu8cxCTs-RRJjQ@mail.gmail.com>
References: <CAB1Cj4Nu5bjiKaAZr-BMR_1sZJCr87Ty1KP-q8JwEyQtsFNqJQ@mail.gmail.com>
	<20190505093112.GB1585@paquier.xyz>
	<CAB1Cj4Nf3iMfXWvFSn7voq1h9udGKwrn7urC2B0=zGUMiPbAYw@mail.gmail.com>
	<CA+bJJbxbAVCc+h=eUmyA_TiJmDDiaG0xCoMm79EAaOCtyUpS7A@mail.gmail.com>
	<CAHE3wghjY7HOxVBSoy3MQAS87L-63d12REvatu8cxCTs-RRJjQ@mail.gmail.com>

On 2019-05-06 03:46, Euler Taveira wrote:
> Em dom, 5 de mai de 2019 às 08:16, Francisco Olarte
> <folarte@peoplecall.com> escreveu:
>>
>> "If a column in the parent table is an identity column, that property
>> is not inherited. A column in the child table can be declared identity
>> column if desired."
>>
> Although, it is documented, it seems inconsistent with sequence
> behavior (child table inherits sequences). Since sequences are
> inherited I think identity columns (that use implicit sequences)
> should be inherited as well. It seems an oversight in the current
> implementation, however, I see it as a new feature.

Some of the semantics of this would not be entirely clear.  Who would
own the sequence?  What happens when you drop the identity property from
the inheritance root or an inheritance child?  It's probably doable, but
it would need some serious thinking.

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





view thread (9+ messages)

Message-ID: <0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com>
Permalink:  ../0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com/
Also on:    postgresql.org/message-id/0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, euler@timbira.com.br, folarte@peoplecall.com, jlviejo@gmail.com, michael@paquier.xyz
  Subject: Re: identity not working with inherited table
  In-Reply-To: <0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com>
  References: <CAB1Cj4Nu5bjiKaAZr-BMR_1sZJCr87Ty1KP-q8JwEyQtsFNqJQ@mail.gmail.com> <20190505093112.GB1585@paquier.xyz> <CAB1Cj4Nf3iMfXWvFSn7voq1h9udGKwrn7urC2B0=zGUMiPbAYw@mail.gmail.com> <CA+bJJbxbAVCc+h=eUmyA_TiJmDDiaG0xCoMm79EAaOCtyUpS7A@mail.gmail.com> <CAHE3wghjY7HOxVBSoy3MQAS87L-63d12REvatu8cxCTs-RRJjQ@mail.gmail.com> <0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox