Re: constraint with reference to the same table

Поиск
Список
Период
Сортировка
От Rudi Starcevic
Тема Re: constraint with reference to the same table
Дата
Msg-id 3EC2DA46.4070105@oasis.net.au
обсуждение исходный текст
Ответ на Re: constraint with reference to the same table  (Rudi Starcevic <rudi@oasis.net.au>)
Список 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 по дате отправления:

Предыдущее
От: Rudi Starcevic
Дата:
Сообщение: Re: constraint with reference to the same table
Следующее
От: "Victor Yegorov"
Дата:
Сообщение: Re: constraint with reference to the same table