Re: Two sequences associated with one identity column - Mailing list pgsql-general

From Colin 't Hart
Subject Re: Two sequences associated with one identity column
Date
Msg-id CAMon-aRc98VxwgCtwmoyAmp3wygArCNTcf2q4MEMGjNgm-Qn0Q@mail.gmail.com
Whole thread Raw
In response to Re: Two sequences associated with one identity column  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
Thanks. But as I wrote above, trying to alter either of the two
sequences and specifying "owned by none" results in the error.

/Colin

On Wed, 29 Oct 2025 at 13:02, hubert depesz lubaczewski
<depesz@depesz.com> wrote:
>
> On Wed, Oct 29, 2025 at 12:27:44PM +0100, Colin 't Hart wrote:
> > One of my clients has a database in which a single identity column
> > (called "id" in that table) has two sequences associated with it(!)
> > Both sequences display
> > Sequence for identity column: <schema>.<table>.id
> > when described with \d in psql.
> > Trying to drop either sequence results in
>
> Try:
>
> ALTER SEQUENCE some_seq_name OWNED BY none;
> DROP SEQUENCE some_seq_name;
>
> Best regards,
>
> depesz
>



pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Two sequences associated with one identity column
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Two sequences associated with one identity column