Re: Global Sequences
От | Tom Lane |
---|---|
Тема | Re: Global Sequences |
Дата | |
Msg-id | 27264.1350573348@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Global Sequences (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Global Sequences
|
Список | pgsql-hackers |
Robert Haas <robertmhaas@gmail.com> writes: > On Tue, Oct 16, 2012 at 1:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Or maybe better, invent a level of indirection like a "sequence access >> method" (comparable to index access methods) that provides a compatible >> set of substitute functions for sequence operations. If you want to >> override nextval() for a sequence, don't you likely also need to >> override setval(), currval(), etc? Not to mention overriding ALTER >> SEQUENCE's behavior. > This might be better, but it's also possibly more mechanism than we > truly need here. But then again, if we're going to end up with more > than a handful of handlers, we probably do want to do this. It's definitely a lot of mechanism, and if we can get away with something simpler that's fine with me. But I'd want to see a pretty bulletproof argument why overriding *only* nextval is sufficient (and always will be) before accepting a hook for just nextval. If we build an equivalent amount of functionality piecemeal it's going to be a lot uglier than if we recognize we need this type of concept up front. regards, tom lane
В списке pgsql-hackers по дате отправления: