Dirk Olmes wrote:
> I'm currently working on the postgres adaptor and it makes some progress
> (more in a separate mail). I've stumbled over the constraints also (but
nifty! I'm actually compiling 7.3.2 as we speak.. :)
According to the mailing list the pg-jdbc driver seems to have many little
quirks, make sure you use the latest 7.3 release or even -dev.
> not related to holger's updates) and my fix was to create the
> constraints as "DEFERRABLE INITIALLY DEFERRED". This way, the
> constraints will not be checked by the time a SQL command is issued but
> at the end of the transaction.
This was my first idea as well but it turned out to be something else; the
statements were simply not sorted correctly.
> On my last Oracle project declaring all constraints as deferrable
> initially deferred helped to avoid a lot of troubles and now I wonder if
absolutely, but..
> this wouldn't be a sensible default for oracle, too.
..at least for the unit tests having the constraints as strict as possible
is good for testing the statement sorting. INITIALLY DEFERRED might be a
last chance if there's a cyclic dependency that cannot be broken up.
> Sidenote: I wonder how the unit test passed on oracle but I guess that's
> due to details on the inner workings of constraints between oracle and
> postgresql.
pg has initially deferred as well, but it should not be necessary for the
unit tests.
rock on!
-h
This archive was generated by hypermail 2.0.0 : Thu Feb 06 2003 - 06:17:21 EST