Re: constraint with reference to the same table

From: Rudi Starcevic <rudi(at)oasis(dot)net(dot)au>
To:
Cc: Postgres Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: constraint with reference to the same table
Date: 2003-05-15 00:07:34
Message-ID: 3EC2DA46.4070105@oasis.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

Oops - sorry I made a typo on those 2 index's.

Wrong:
CREATE INDEX business_idx ON business_businesstype (business);
CREATE INDEX businesstype_idx ON business_businesstype (businesstype);

Right:
CREATE INDEX business_idx ON business_businesstype (b_id);
CREATE INDEX businesstype_idx ON business_businesstype (bt_id);

The table:
CREATE TABLE business_businesstype
(
b_bt_id serial PRIMARY KEY,
b_id integer REFERENCES business ON UPDATE CASCADE ON DELETE CASCADE NOT
NULL,
bt_id integer REFERENCES businesstype ON UPDATE CASCADE ON DELETE
CASCADE NOT NULL
);

Thanks
Regards
Rudi.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Victor Yegorov 2003-05-15 00:12:39 Re: constraint with reference to the same table
Previous Message Rudi Starcevic 2003-05-14 23:57:09 Re: constraint with reference to the same table