Re: Global Sequences

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Global Sequences
Date: 2012-10-18 06:56:23
Message-ID: CA+U5nM+hjoiJGPWKhmm4vWGpmVfeDP8PcfHgqbGvwDfs7zh74A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17 October 2012 11:21, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>> On 16 October 2012 15:15, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-10-18 06:58:35 Re: Global Sequences
Previous Message Simon Riggs 2012-10-18 06:25:57 Re: Bugs in planner's equivalence-class processing