Re: [HACKERS] Primary key requires SERIAL

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Don Baccus <dhogaza(at)pacifier(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Primary key requires SERIAL
Date: 1999-11-19 06:32:14
Message-ID: 3834EEEE.DEE4EBD1@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-11-19 06:35:59 Re: [HACKERS] 7.0 status request
Previous Message Tom Lane 1999-11-19 05:50:32 Re: [HACKERS] psql & regress tests