Re: Sequences/defaults and pg_dump - Mailing list pgsql-general

From Nikolay Samokhvalov
Subject Re: Sequences/defaults and pg_dump
Date
Msg-id e431ff4c0602070819l356376d8wa7f5912956a72ffd@mail.gmail.com
Whole thread Raw
In response to Re: Sequences/defaults and pg_dump  ("John D. Burger" <john@mitre.org>)
List pgsql-general
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@mitre.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sequences/defaults and pg_dump
Next
From: Richard Huxton
Date:
Subject: Re: Syncing Databases Weekly