Skip site navigation (1) Skip section navigation (2)

Re: AW: [HACKERS] sequence creation

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: andreas(dot)zeugswetter(at)telecom(dot)at (Andreas Zeugswetter)
Cc: lockhart(at)alumni(dot)caltech(dot)edu, hackers(at)postgreSQL(dot)org
Subject: Re: AW: [HACKERS] sequence creation
Date: 1998-08-29 02:55:29
Message-ID: 199808290255.WAA27658@candle.pha.pa.us (view raw or flat)
Thread:
Lists: 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);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> exactly this. :-)    (like in Informix)
> 
> Informix also allows to specify a starting value like:
> create table t (s serial(1000)); 
> defaulting to 1 but I think this additional syntax is rather misleading

Thanks to Thomas, this will be in 6.4.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-08-29 02:55:53
Subject: Re: [HACKERS] Minor bug: inconsistent handling of overlength names
Previous:From: Bruce MomjianDate: 1998-08-29 02:54:49
Subject: Re: [HACKERS] odd pg_dump output?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group