Re: BUG #13735: pg_get_serial_sequence can be incorrect - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13735: pg_get_serial_sequence can be incorrect
Date
Msg-id 4800.1445898830@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13735: pg_get_serial_sequence can be incorrect  (colin.knox@offers.com)
List pgsql-bugs
colin.knox@offers.com writes:
> Basically, pg_get_serial_sequence does not actually check the default value
> in the table, it only checks the most recent sequence to have declared
> itself owned by that column, regardless of what sequence is actually in use.

Quite, and that's its documented behavior:

pg_get_serial_sequence returns the name of the sequence associated with a
column ... This association can be modified or removed with ALTER SEQUENCE
OWNED BY.  (The function probably should have been called
pg_get_owned_sequence; its current name reflects the fact that it's
typically used with serial or bigserial columns.)

            regards, tom lane

pgsql-bugs by date:

Previous
From: colin.knox@offers.com
Date:
Subject: BUG #13735: pg_get_serial_sequence can be incorrect
Next
From: michael@snupps.com
Date:
Subject: BUG #13739: Recurring corrupted page pointer panics on hot-standby replica