Re: Creating foreign key constraint to child table?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Creating foreign key constraint to child table?
Дата
Msg-id Pine.BSF.4.21.0108051218300.25692-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Creating foreign key constraint to child table?  (Allan Engelhardt <allane@cybaea.com>)
Список pgsql-sql
On Sun, 5 Aug 2001, Allan Engelhardt wrote:

>     test=# create table baz(bar integer, constraint fk_bar foreign key (bar) references foo(id));
>     NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
>     CREATE
> 
> but this is not exactly what I want: I need to ensure that baz.bar is
> a bar and not just any foo.
> 

Not that this is related to what you asked about precisely (I saw the
response you made), but the query above also doesn't do what you think
it does right now.  It currently makes a reference to only foo, not
any subchildren of foo.




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

Предыдущее
От: Allan Engelhardt
Дата:
Сообщение: Re: Creating foreign key constraint to child table?
Следующее
От: Allan Engelhardt
Дата:
Сообщение: Re: Creating foreign key constraint to child table?