From: | darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain) |
---|---|
To: | t-ishii(at)sra(dot)co(dot)jp |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] SERIAL data type |
Date: | 1998-09-12 02:14:40 |
Message-ID: | m0zHfCy-00006FC@druid.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thus spake Tatsuo Ishii
> 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?
Perhaps it should not be possible to specify a value for serial types.
Make it always use the next value no matter what is supplied. Could
make dump and restore a problem of course but I can think of some
situations where it would make the programming simpler.
--
D'Arcy J.M. Cain <darcy(at){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.
From | Date | Subject | |
---|---|---|---|
Next Message | Billy G. Allie | 1998-09-12 02:43:09 | Re: [HACKERS] SERIAL data type |
Previous Message | D'Arcy J.M. Cain | 1998-09-12 02:11:31 | Re: [HACKERS] Serial Data Type |