Re: CREATE TABLE with REFERENCE

Поиск
Список
Период
Сортировка
От Dmitry Tkach
Тема Re: CREATE TABLE with REFERENCE
Дата
Msg-id 3F257DFD.4060808@openratings.com
обсуждение исходный текст
Ответ на CREATE TABLE with REFERENCE  (kay-uwe.genz <kug1977@web.de>)
Ответы Re: CREATE TABLE with REFERENCE  (Jonathan Bartlett <johnnyb@eskimo.com>)
Список pgsql-general
Jonathan Bartlett wrote:

>Why not just drop the "references" clause?  I mean, the point of having
>transactions is to guarantee integrity within a transaction, if you're not
>going to have that, why even bother with the clause?
>
Quite the opposite - the point is to guaratee the integrity *outside*
the transaction.

You can set the constraints to be 'deferred', so that the referential
integrity only gets verified at the time you commit your transaction-
this way you can allow 'temporary' violations of the constraints inside
your transactions, while still being guaranteed that all the data that
actually gets committed satisfies all of your constraints.

>
>Most of my databases don't even user "references", just because I like the
>flexibility, and I have multitable keys (keys that can refer to rows from
>multiple tables).
>
>
Not much to brag about :-)

Dima



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

Предыдущее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Re: CREATE TABLE with REFERENCE
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Using YY-MM-DD date input