Re: [HACKERS] Primary key requires SERIAL - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] Primary key requires SERIAL
Date
Msg-id 3834EEEE.DEE4EBD1@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Primary key requires SERIAL  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] Primary key requires SERIAL
List pgsql-hackers
> > >> > We currently only allow the words PRIMARY KEY on a SERIAL column.
> > Oops, I guess I blew it by responding to a post by Bruce assuming he
> > was right.
> Seems I can't realy on understanding what we support by just looking at
> gram.y.

You can, if you read carefully :)

The grammar allows *only* PRIMARY KEY on the SERIAL column
declaration, since the other keywords or clauses are either redundant
or nonsensical in the context of a serial column. As others have
pointed out, PRIMARY KEY is also allowed elsewhere.
                       - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] psql & regress tests
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] 7.0 status request