Re: pg_sequence catalog
От | Tom Lane |
---|---|
Тема | Re: pg_sequence catalog |
Дата | |
Msg-id | 26112.1473129320@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: pg_sequence catalog (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: pg_sequence catalog
|
Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes: > On September 5, 2016 7:26:42 AM PDT, Tom Lane <tgl@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
В списке pgsql-hackers по дате отправления: