Re: Identity columns should own only one sequence

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Identity columns should own only one sequence
Date: 2019-04-26 15:55:34
Message-ID: 20190426155534.GA23691@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Apr-26, Laurenz Albe wrote:

> What do you think of the patch I just posted on this thread to
> remove ownership automatically when the default is dropped, as Michael
> suggested? I think that would make things much more intuitive from
> the user's perspective.

I think a better overall fix is that that when creating the generated
column (or altering a column to make it generated) we should look for
existing an existing sequence and take ownership of that (update
pg_depend records), before deciding to create a new sequence.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-26 16:38:26 Re: Segfault when restoring -Fd dump on current HEAD
Previous Message Alvaro Herrera 2019-04-26 15:39:21 Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table