Re: Problems w. SERIAL
От | Morten Primdahl |
---|---|
Тема | Re: Problems w. SERIAL |
Дата | |
Msg-id | 3AF4A1F2.A78F3333@primdahl.net обсуждение исходный текст |
Ответы |
more-than-one-SERIAL column per table
|
Список | pgsql-general |
> \d tbl_c_id_seq > > if it is not there, you can create it yourself Thanks, the sequence was not there. Just puzzled me that when creating tbl_c, I get: test=# CREATE TABLE tbl_c (id SERIAL PRIMARY KEY, data VARCHAR(50), a SERIAL CONSTRAINT a_ref REFERENCES tbl_a(id), b SERIAL CONSTRAINT b_ref REFERENCES tbl_b(id) );test-# test(# test(# test(# test(# NOTICE: CREATE TABLE will create implicit sequence 'tbl_c_id_seq' for SERIAL column 'tbl_c.id' NOTICE: CREATE TABLE will create implicit sequence 'tbl_c_a_seq' for SERIAL column 'tbl_c.a' NOTICE: CREATE TABLE will create implicit sequence 'tbl_c_b_seq' for SERIAL column 'tbl_c.b' NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'tbl_c_pkey' for table 'tbl_c' NOTICE: CREATE TABLE/UNIQUE will create implicit index 'tbl_c_a_key' for table 'tbl_c' NOTICE: CREATE TABLE/UNIQUE will create implicit index 'tbl_c_b_key' for table 'tbl_c' NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) CREATE Thanks for the tip, I'll consider this a bug and doublecheck the notices from postgres from now on. Morten
В списке pgsql-general по дате отправления: