Re: pg_sequence catalog

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_sequence catalog
Дата
Msg-id 8910.1473085602@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_sequence catalog  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: pg_sequence catalog  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> On 4 September 2016 at 23:17, Greg Stark <stark@mit.edu> wrote:
>> So? Clients expect changes like this between major releases surely.
>> Subtle changes that cause silent breakage for end-users seems scarier
>> than unsubtle breakage that tool authors can fix.

> Agreed; some change in the behaviour if SELECT * FROM sequence is
> effectively part of this proposal. I was going to make the same
> comment myself.

Well, if we're going to blow off compatibility on that score, I suggest
that we blow it off all the way.  Make sequences not be relations anymore,
and what you do instead of "SELECT * FROM sequence" is "SELECT * FROM
pg_sequences WHERE seqname = 'sequence'".  Or more likely, since sequences
should still belong to schemas, we need a "regsequence" OID-alias type
like "regclass" and you do "SELECT * FROM pg_sequences WHERE oid =
'foo.bar'::regsequence".

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.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ildar Musin
Дата:
Сообщение: Re: Index Onlys Scan for expressions
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: new autovacuum criterion for visible pages