Search Postgresql Archives

Re: pgsql constraints and temporal tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom!

Tom Lane ha scritto:
> Enrico Sirola <enrico.sirola@xxxxxxxxx> 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

ah! My fault! I created the triggers with "create constraint trigger",
but was misleaded by the documentation on constraints, that says
triggers are not deferrables.

Thanks for the help,
e.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux