Re: [HACKERS] sequence creation - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] sequence creation
Date
Msg-id 35DA39FD.CBA5915C@alumni.caltech.edu
Whole thread Raw
In response to sequence creation  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] sequence creation\  (darcy@druid.net (D'Arcy J.M. Cain))
Re: [HACKERS] sequence creation  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> Right now, we allow PRIMARY to auto-create an index.
> Can we have something to auto-create sequences, instead of the more
> complicated CREATE SEQUENCE process.
> Perhaps use the data type SERIAL to autocreate a sequence.  Should
> make life easier for novices.  We are getting too many sequence
> questions.

That would be possible. I'd be happier doing it for v6.5, since I'm
hoping to work on docs in the meantime. Of course, maybe it would be
easy :)

What should the syntax be exactly?

  CREATE TABLE t (s SERIAL);

or

  CREATE TABLE t (i INT DEFAULT SERIAL);

or ??

Are there alternate syntaxes from other DBs which should be considered?

                      - Tom

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Massive patch
Next
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: [HACKERS] sequence creation\