Re: Global Sequences
От | Simon Riggs |
---|---|
Тема | Re: Global Sequences |
Дата | |
Msg-id | CA+U5nM+hjoiJGPWKhmm4vWGpmVfeDP8PcfHgqbGvwDfs7zh74A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Global Sequences (Dimitri Fontaine <dimitri@2ndQuadrant.fr>) |
Ответы |
Re: Global Sequences
|
Список | pgsql-hackers |
On 17 October 2012 11:21, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote: > Simon Riggs <simon@2ndQuadrant.com> writes: >> On 16 October 2012 15:15, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> What you really want is something vaguely like nextval but applied to >>> a distinct type of object. That is, I think we first need a different >>> kind of object called a "global sequence" with its own DDL operations. >>> >> hence a different solution. CREATE SEQUENCE is SQL Standard and used >> by SERIAL, many people's SQL, SQL generation tools etc.. My objective >> is to come up with something that makes the standard code work >> correctly in a replicated environment. > > I think we still can have both. I like Tom's suggestion better, as it > provides for a cleaner implementation in the long run, I think. Not sure how it is cleaner when we have to have trigger stuff hanging around to make one object pretend to be another. That also creates a chain of dependency which puts this into the future, rather than now. The goal is make-sequences-work, not to invent something new that might be cooler or more useful. If we create something new, then we need to consider the references Daniel described, but that is a whole different thing and already accessible if you need/want that. -- Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: