[GENERAL] FOREIGN KEY: MATCH FULL

2001-09-05 Thread Gabriel Fernandez

Hi,

What does it mean the MATCH FULL parameter in a foreign key specfication
?

It seems it is only valid for a multi-column foreign key: What's a
multi-column foreign key ?

I've tried to search this in Bruce's book but I have a lot of problems
to connect to it at   http://www.postgresql.org/docs/awbook.html

Thanks,

Gabi :-)



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [GENERAL] FOREIGN KEY: MATCH FULL

2001-09-05 Thread Stephan Szabo


On Wed, 5 Sep 2001, Gabriel Fernandez wrote:

 Hi,
 
 What does it mean the MATCH FULL parameter in a foreign key specfication
 ?
 
 It seems it is only valid for a multi-column foreign key: What's a
 multi-column foreign key ?

It's only different on multi-column fks, it's valid but uninteresting
on singles.  A multi column foreign key is something like the one
in the following:
create table foo (
 a int,
 b int,
 foreign key (a,b) references bar
);
The key that's being checked is the combination of a and b.

For the unspecified match type, if either is NULL, the constraint
is passed.  For MATCH FULL, either both must be non-NULL and match
in the other table or both must be null for the constraint to pass.



---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html