Re: identity not working with inherited table - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: identity not working with inherited table
Date
Msg-id 0c4f3c9d-753b-1985-48a9-03fdc782d1d8@2ndquadrant.com
Whole thread Raw
In response to Re: identity not working with inherited table  (Euler Taveira <euler@timbira.com.br>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 9.3.5 substring(text from pattern for escape) bug