Re: Global Sequences - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Global Sequences
Date
Msg-id CA+U5nM+hjoiJGPWKhmm4vWGpmVfeDP8PcfHgqbGvwDfs7zh74A@mail.gmail.com
Whole thread Raw
In response to Re: Global Sequences  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Global Sequences
List 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 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Bugs in planner's equivalence-class processing
Next
From: Simon Riggs
Date:
Subject: Re: Global Sequences