Re: new rule syntax?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: new rule syntax?
Дата
Msg-id 43E71B9F.5090207@archonet.com
обсуждение исходный текст
Ответ на new rule syntax?  ("A. R. Van Hook" <hook@lake-lotawana.mo.us>)
Список pgsql-sql
A. R. Van Hook wrote:
> I have two tables defined as:
> checks
>        (ckid                int NOT null PRIMARY KEY,
>         payto               text,
>         notes               text,
>         ckdate              date,
>         printed             int  default 0,
>         tdate               timestamp not null)
> checkitems
>        (item                int not null,
>         ckid                int NOT null references checks,
>         itemtype            int not null,
>         amt                 numeric(7,3),
>         primary key         (item, ckid))
> 
> in previous versions (<8.1) the following rule declaration seemed to 
> work fine

Others have addresses your query with the rule. Can I ask why you're not 
using a DELETE CASCADE on the fkey?
...
ckid    int NOT null references checks ON DELETE CASCADE,
...

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tony Wasson
Дата:
Сообщение: Re: Function Dependency
Следующее
От: Josep Sanmartí
Дата:
Сообщение: Trigger on a column