Re: Problems w. SERIAL

From: Morten Primdahl <morten(at)primdahl(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems w. SERIAL
Date: 2001-05-06 00:59:31
Message-ID: 3AF4A1F2.A78F3333@primdahl.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-05-06 01:30:17 Re: nested if , and how to trigger....
Previous Message Lee Harr 2001-05-06 00:38:49 Re: Problems w. SERIAL