Re: Problems w. SERIAL - Mailing list pgsql-general

From Morten Primdahl
Subject Re: Problems w. SERIAL
Date
Msg-id 3AF4A1F2.A78F3333@primdahl.net
Whole thread Raw
Responses more-than-one-SERIAL column per table  (will trillich <will@serensoft.com>)
List 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 by date:

Previous
From: HYip
Date:
Subject: select error with null string -- error code -209
Next
From: Alan Young
Date:
Subject: Compiling pl/perl problems.