On Fri, Aug 16, 2002 at 16:15:57 +0100, Gary Stainburn <[EMAIL PROTECTED]> wrote: > > I only want the insert to work if prpid matches pgpid and prnozzle matches > pgnozzle.
There are several typos in your sample that make it hard to know for sure what you want to do. However I suspect you just want to add a foreign key clause to your table definition. These can refer to more than one column (unlike references). My memory is that you need a matching unique index defined for the table you are referencing. ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html