pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rudi Starcevic <rudi@oasis.net.au>
Cc: Postgres Performance <pgsql-performance@postgresql.org>
Subject: Re: constraint with reference to the same table
Date: Thu, 15 May 2003 10:07:34 +1000
Message-ID: <3EC2DA46.4070105@oasis.net.au> (raw)
In-Reply-To: <3EC2D7D5.1010404@oasis.net.au>
References: <20030514162559.O51040-100000@megazone23.bigpanda.com>
	<3EC2D7D5.1010404@oasis.net.au>

  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.





view thread (18+ messages)  latest in thread

Message-ID: <3EC2DA46.4070105@oasis.net.au>
Permalink:  ../3EC2DA46.4070105@oasis.net.au/
Also on:    postgresql.org/message-id/3EC2DA46.4070105@oasis.net.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: rudi@oasis.net.au
  Subject: Re: constraint with reference to the same table
  In-Reply-To: <3EC2DA46.4070105@oasis.net.au>
  References: <20030514162559.O51040-100000@megazone23.bigpanda.com> <3EC2D7D5.1010404@oasis.net.au> <3EC2DA46.4070105@oasis.net.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox