From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Gabriel Fernandez <gabi(at)unica(dot)edu> |
Cc: | PostgreSQL-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: FOREIGN KEY: MATCH FULL |
Date: | 2001-09-06 04:54:11 |
Message-ID: | Pine.BSF.4.21.0109052151380.90362-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-09-06 05:07:12 | Re: index naming conventions |
Previous Message | Tom Lane | 2001-09-06 04:10:39 | Re: SERIAL, too low a value |