On Fri, Jul 08, 2005 at 05:03:37AM +0200, PFC wrote: > >On Fri, Jul 08, 2005 at 01:56:26AM +0200, PFC wrote: > >>Hm, interesting, you mean the return value of lastval() also depends > >>if you set your constraints to deferred or immediate ? > > > >My mind's ablank trying to contrive a situation where that would > >matter. Can you provide an example? > > It's rather perverse and farfetched, but what would stop one from > putting some insert statements in a function that happens to be called > somewhere inside of a check constraint... although one could agree that > it's a bit shooting oneself in the foot...
PostgreSQL doesn't support deferral of check constraints, only foreign key constraints. But yeah, if you could do that then presumably lastval() might return a different sequence's value depending on whether the constraints were deferred or immediate. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org