PRIMARY KEY & INHERITANCE (fwd)
Ferruccio Zamuner <nonsolosoft@diff.org>
From: Ferruccio Zamuner <nonsolosoft@diff.org>
To: pgsql-general@hub.org
Date: 2000-07-18T20:11:36Z
Lists: 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