On 17 October 2012 11:21, Dimitri Fontaine <dimi...@2ndquadrant.fr> wrote: > Simon Riggs <si...@2ndquadrant.com> writes: >> On 16 October 2012 15:15, Tom Lane <t...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers