This works.
  CREATE TABLE x (a serial, b int);
but this doesn't.
  CREATE TABLE x (a serial PRIMARY KEY, b int);

Should it?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

Tue, 15 Sep 1998 14:50:47 -0400 (EDT)
darcy@druid.net (D'Arcy J.M. Cain)
Serial syntax
> This works.
>   CREATE TABLE x (a serial, b int);
> but this doesn't.
>   CREATE TABLE x (a serial PRIMARY KEY, b int);
> Should it?

Yeah. I'm testing some patches now...

                    - Tom

Wed, 16 Sep 1998 04:45:23 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Serial syntax
> Yeah. I'm testing some patches now...

postgres=> create table t (s serial, ss serial primary key);
NOTICE:  CREATE TABLE will create implicit sequence
         t_s_key for SERIAL column t.s
NOTICE:  CREATE TABLE will create implicit sequence
         t_ss_seq for SERIAL column t.ss
NOTICE:  CREATE TABLE/UNIQUE will create implicit index
         t_s_key for table t
NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index
         t_pkey for table t
CREATE

Wed, 16 Sep 1998 05:18:16 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: [HACKERS] Serial syntax
> > Yeah. I'm testing some patches now...

I've committed patches to the cvs source tree to allow PRIMARY KEY to be
specified with the SERIAL type. The patches also fix some DEFAULT NULL
problems and the "SELECT @1" problem.

With these patches and fixes for the rules regression tests and results
all regression tests pass on my linux-2.0.30/i686 machine.

I've enclosed the source patches _except_ for the regression test
changes, since those involve new files, etc. Also, I have _not_ updated
gram.c yet, so anyone building in the next few days may need bison to
build. If that is a problem someone can go ahead and build and commit a
new gram.c.

I'm out of town tomorrow through Sunday, but keep those cards and
letters coming :)

                         - Tom
Wed, 16 Sep 1998 15:13:33 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Serial syntax, DEFAULT NULL, and rules