Re: Resolving of reference/foreign keys

Поиск
Список
Период
Сортировка
От Thomas O'Dowd
Тема Re: Resolving of reference/foreign keys
Дата
Msg-id 20020320093550.C1200@beast.uwillsee.com
обсуждение исходный текст
Ответ на Re: Resolving of reference/foreign keys  (Fredrik Wendt <fredrik.wendt@linux.se>)
Список pgsql-jdbc
On Wed, Mar 20, 2002 at 01:31:07AM +0100, Fredrik Wendt wrote:
> Thomas O'Dowd wrote:
>
>  > [...]
>  > I've set ON DELETE to NO ACTION which means that if you delete a row
>  > from table a which is a FK in table b, the delete will fail unless you
>  > also delete the row in table b. I believe this is what you're looking
>  > for.
>  >
>  > You don't need to write any special code then to test or count
>  > references etc. Postgresql does it all for you. Check out the
>  > docs for more info.
>
> Just a quick one: This deletion, must it be done in (1) one statement,
> or can the delete operation be approved if (2) multiple delete
> statements are issued within a transaction?

The DEFERRABLE keyword says that the RI check should wait until the
end of a transaction before complaining. So the answer is both in
this case. Its all in the docs.

http://www.postgresql.org/idocs/index.php?sql-createtable.html

Tom.
--
Thomas O'Dowd. - Nooping - http://nooper.com
tom@nooper.com - Testing - http://nooper.co.jp/labs

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

Предыдущее
От: Fredrik Wendt
Дата:
Сообщение: Re: Resolving of reference/foreign keys
Следующее
От: Thomas O'Dowd
Дата:
Сообщение: Re: "No results were returned by the query" exceptions