Re: constraint with reference to the same table - Mailing list pgsql-performance

From Rudi Starcevic
Subject Re: constraint with reference to the same table
Date
Msg-id 3EC2DA46.4070105@oasis.net.au
Whole thread Raw
In response to Re: constraint with reference to the same table  (Rudi Starcevic <rudi@oasis.net.au>)
List 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.



pgsql-performance by date:

Previous
From: Rudi Starcevic
Date:
Subject: Re: constraint with reference to the same table
Next
From: "Victor Yegorov"
Date:
Subject: Re: constraint with reference to the same table