Re: pgsql constraints and temporal tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql constraints and temporal tables
Дата
Msg-id 7902.1197648414@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql constraints and temporal tables  (Enrico Sirola <enrico.sirola@gmail.com>)
Ответы Re: pgsql constraints and temporal tables  (Enrico Sirola <enrico.sirola@gmail.com>)
Список pgsql-general
Enrico Sirola <enrico.sirola@gmail.com> writes:
> However, I'm facing a problem I'm not able to solve with postgresql:
> usually updating or deleting time-varying data means to temporary
> violate a constraint in a transaction but ensuring that at the end of
> the transaction the table(s) is(are) in a consistent state, but this
> seems impossible to do because trigger constraints are not deferrable.

Use CREATE CONSTRAINT TRIGGER:
http://developer.postgresql.org/pgdocs/postgres/sql-createconstraint.html

(This statement has been there all along, but was marked as deprecated
in pre-8.3 releases, for now-forgotten reasons.)

            regards, tom lane

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: rewrite pl/pgsql functions to c - remote job
Следующее
От: "Jan Sunavec"
Дата:
Сообщение: Re: convert function