IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Possibly not a bug:
[link|http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html|http://www.postgresq...-createtable.html]
Referential actions other than the NO ACTION check cannot be deferred, even if the constraint is declared deferrable.


and
NO ACTION

Produce an error indicating that the deletion or update would create a foreign key constraint violation. If the constraint is deferred, this error will be produced at constraint check time if there still exist any referencing rows. This is the default action.


You might try INITIALLY DEFERRED instead.

The functionality has been in there since 7.4 at least, so I doubt that it isn't working.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New The naming convention is a bug in itself
I have googled away and cannot find anywhere a coherent explanation of the differences or semantic benefits between choosing initially deferred and deferrable. So I've simply declared them all deferrable.

I'll changed them to initially deferred and see.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Removes the need for SET CONSTRAINTS
As far as I can tell. You're right, it's not their best documented feature.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Initially Deferred seems to be doing the right thing -thx
This is really getting to be nice development environment - I've added schema comparison/migration features to glorp in squeak and now I just change the object model and it syncs it on demand - with warnings for non-empty tables when dropping and options to merge dropped non-empty columns to other columns. Doing the inverse sync from tables to objects should take all of a couple hours giving round tripping in two directions.

Rails, shmails.



[link|http://www.blackbagops.net|Black Bag Operations Log]

[link|http://www.objectiveclips.com|Artificial Intelligence]

[link|http://www.badpage.info/seaside/html|Scrutinizer]
New Re: Initially Deferred seems to be doing the right thing -th
I reckon the SET CONSTRAINTS wasn't working for some reason, then.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     So does 'DEFERRABLE' not work in postgres? - (tuberculosis) - (5)
         Possibly not a bug: - (admin) - (4)
             The naming convention is a bug in itself - (tuberculosis) - (3)
                 Removes the need for SET CONSTRAINTS - (admin) - (2)
                     Initially Deferred seems to be doing the right thing -thx - (tuberculosis) - (1)
                         Re: Initially Deferred seems to be doing the right thing -th - (admin)

If your attack is going too well, you're walking into an ambush.
42 ms