Andres Freund <and...@anarazel.de> writes:
> On September 5, 2016 7:26:42 AM PDT, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> The main problem I can see with this is that serial columns will have
>> default expressions that are written out as
>> "nextval('foo_f1_seq'::regclass)".  I do not think we can afford to
>> break dumps containing that, but I'm not sure how to get the regclass
>> cast replaced with a regsequence cast.

> Why not just continue having a pgclass entry, but no relfilenode?

Yeah, maybe.  I was hoping to dispense with the pg_attribute rows, but
maybe that's not enough overhead to worry about.

In this viewpoint, we'd keep the sequence-specific data in a pg_sequence
catalog.  pg_sequence rows would be extensions of the associated pg_class
rows in much the same way that pg_index rows extend the pg_class entries
for indexes.  We should supply a view pg_sequences that performs the
implied join, and encourage users to select from that rather than directly
from pg_sequence (compare pg_indexes view).

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to