Jon Horsman wrote: > Basically table 1 and table 2 both have the concept of an extension > that must be unique but the rest of the info in the tables are > different. I need to ensure that if i add an entry to table 1 with > extension 1000 that it will fail if there is already an entry in > table2 with the same extension.
Make a third table that contains all the extension and add two columns, one referencing table 1 and one referencing table 2, and then add a constraint that only one of the two can be not null. It's not very pretty, but you can use views to make the access simpler. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq