SERIAL data type - Mailing list pgsql-hackers

From t-ishii@sra.co.jp (Tatsuo Ishii)
Subject SERIAL data type
Date
Msg-id 199809120125.KAA05600@meshsv26.tk.mesh.ad.jp
Whole thread Raw
Responses Re: [HACKERS] SERIAL data type  (darcy@druid.net (D'Arcy J.M. Cain))
Re: [HACKERS] SERIAL data type  ("Billy G. Allie" <Bill.Allie@mug.org>)
List pgsql-hackers
A few questions for new SERIAL data type:

o dropping a table including a serial data type does not drop the sequence
  corresponding to the table. This prevents re-creating the table.
  Do we have to remove the sequence by hand?

o explicit insertion to the serial column sets the value specified.
  This is good. However, next implicit insertion results in that
  previous value from the sequence + 1 is set.

  create table t (c text, i serial);
  insert into t values('a');
  insert into t values('b',100);
  insert into tvalues('c');
  select * from t;

   a   1
   b    100
   c    2

  This seems a little bit unnatural for me. may be i of the thrid row
  should be 101?

--
Tatsuo Ishii
t-ishii@sra.co.jp


pgsql-hackers by date:

Previous
From: "Billy G. Allie"
Date:
Subject: postgreSQL 6.4 patches.
Next
From: t-ishii@sra.co.jp (Tatsuo Ishii)
Date:
Subject: Re: pgrewrite: was Re: [HACKERS] pg_user problem