Re: sequences TODO items

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: systemguards(at)gmail(dot)com, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sequences TODO items
Date: 2005-09-02 21:43:59
Message-ID: 20050902214359.GE30425@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 02, 2005 at 04:57:52PM -0400, Bruce Momjian wrote:
> Jaime Casanova wrote:
> > Hi,
> >
> > i'm looking for some item i can do and that have enough consensus to
> > make it worth the effort... :)
> >
> > * Have sequence dependency track use of DEFAULT sequences, seqname.nextval?
> >
> > what this means? i don't understand it...
>
> The idea is to automatically add a dependency of the sequence on the
> table using it as a default.

Yeah, the point is that if you treat the sequence name as a text
literal, there's no way to track dependency information. On the other
hand, if it were treated as, say, an OID, then we could track the
dependency.

In order to do that, we need to change the representation of the DEFAULT
for a serial column. Instead of the seqname.nextval expression we could
use SQL:2003 syntax, which is something like "NEXT VALUE FOR seqname".

--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"Si un desconocido se acerca y te regala un CD de Ubuntu ...
Eso es ... Eau de Tux"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-09-02 21:55:42 Re: statement logging / extended query protocol issues
Previous Message Alvaro Herrera 2005-09-02 21:40:46 Re: Proof of concept COLLATE support with p.tch