On Wed, Oct 27, 2004 at 05:59:46PM +0200, Pierre-Fr?d?ric Caillaud wrote: > > - add CHECK( test_array( yourcolumn )) in your table definition > - create function test_array which takes an array and looks if all > its elements are in your table T2, I do something like comparing the > length of the array to SELECT count(1) FROM T2 WHERE key IN array
This provides only partial foreign key checking: depending on how the application works, you might also need to ensure that updates and deletes in T2 don't break the references in T1. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]