> > > SERIAL type auto-creates sequence
> > I won't have time to do this for v6.4.
> This would be nice to have, so maybe we can jam it in. If it is not
> 100% correct, we have a month to make it correct, right?
OK, I've committed the SERIAL type support to the CVS tree:
postgres=> create table test (x text, s serial);
NOTICE: CREATE TABLE will create implicit sequence test_s_seq for
SERIAL column test.s
NOTICE: CREATE TABLE/UNIQUE will create implicit index test_s_key for
table test
CREATE
postgres=> insert into test values ('one');
INSERT 894781 1
postgres=> insert into test values ('two');
INSERT 894782 1
postgres=> insert into test values ('three');
INSERT 894783 1
postgres=> select * from test;
x |s
-----+-
one |1
two |2
three|3
(3 rows)
postgres=> \d
Database = postgres
+------------------+----------------------------------+----------+
| Owner | Relation | Type |
+------------------+----------------------------------+----------+
| postgres | test | table |
| postgres | test_s_key | index |
| postgres | test_s_seq | sequence |
+------------------+----------------------------------+----------+
postgres=> select * from test;
x |s
-----+-
one |1
two |2
three|3
(3 rows)
postgres=> \d
pqReadData() -- backend closed the channel unexpectedly.
Whoops! Don't know why this is causing trouble, but it seems to be
reproducible. Will look at it some more...
- Tom