Re: Sequences/defaults and pg_dump

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sequences/defaults and pg_dump
Date: 2006-02-07 16:19:18
Message-ID: e431ff4c0602070819l356376d8wa7f5912956a72ffd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

There is no SERIAL type in the standard at all. Moreover, standard
defines following expression for SEQUENCE GENERATORs:

<next value expression> ::= NEXT VALUE FOR <sequence generator name>

Postgres has non-standard equivalent - nextval(<sequence generator name>)...

So, sequences implementation in PostgreSQL isn't standard-compliant.

On 2/7/06, John D. Burger <john(at)mitre(dot)org> wrote:
> Tom Lane wrote:
>
> > The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
> > a serial column, but we haven't gotten around to enforcing that yet.
>
> Is this per the Standard? If so, then the oft-repeated mantra that
> SERIAL is simply a macro for an INTEGER column with a particular
> DEFAULT seems a bit misleading ...
>
> - John D. Burger
> MITRE
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--
Best regards,
Nikolay

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-07 16:21:22 Re: Sequences/defaults and pg_dump
Previous Message John D. Burger 2006-02-07 16:01:07 Re: Sequences/defaults and pg_dump

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-07 16:21:22 Re: Sequences/defaults and pg_dump
Previous Message Csaba Nagy 2006-02-07 16:04:08 Re: streamlined standby procedure