From: | Ferruccio Zamuner <nonsolosoft(at)diff(dot)org> |
---|---|
To: | pgsql-general(at)hub(dot)org |
Subject: | PRIMARY KEY & INHERITANCE (fwd) |
Date: | 2000-07-18 20:11:36 |
Message-ID: | yam8234.1812.141577424@mail.diff.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Hi,
please look at following example:
CREATE TABLE picture (
id serial not null,
description text,
filename text);
CREATE TABLE advert (
artist text,
customer text,
target text)
INHERITS (picture);
CREATE TABLE work (
id serial not null,
advert_id int4 not null references advert,
value numeric(6,2) default 0);
NOTICE: CREATE TABLE will create implicit sequence 'work_id_seq' for SERIAL
col
umn 'work.id'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'work_id_key' for
table
'work'
NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
ERROR: PRIMARY KEY for referenced table "advert" not found
How can I create PRIMARY KEY CONSTRAINT for table advert?
Thank you in advance for any reply, \fer
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-07-18 21:29:33 | Re: PL/PGSQL Function |
Previous Message | Wim Ceulemans | 2000-07-18 19:53:10 | Re: timestamps |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-07-18 20:48:09 | btree split logic is fragile in the presence of large index items |
Previous Message | Ferruccio Zamuner | 2000-07-18 20:10:58 | MySQL comparison |