Subject: ALTER TABLE doc small thing

From: Grzegorz Szpetkowski <[email-masked]>
Date: Mon, 9 May 2011 17:56:18 +0200

http://www.postgresql.org/docs/9.0/static/sql-altertable.html

"To add a foreign key constraint to a table:

ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address)
REFERENCES addresses (address) MATCH FULL;"

This looks confusing to me. Is "MATCH FULL" works with non-composite
(one adress column) foreign keys at all ?

Regards,
G. Sz.

---

From: Grzegorz Szpetkowski <[email-masked]>
Date: Mon, 9 May 2011 20:12:13 +0200

"NOTE 30 — If MATCH FULL or MATCH PARTIAL is specified for a
referential constraint and if the referencing table has only one
column specified in <referential constraint definition> for that
referential constraint, or if the referencing table has more than one
specified column for that <referential constraint definition>, but
none of those columns is nullable, then the effect is the same as if
no
<match type> were specified."

I found that in SQL:2003 draft, so in above case MATCH FULL is
syntactically ok, but rather confusing and effectively do nothing
(maybe just impression purpose).

Regards,
G. Sz.

---

From: Robert Haas <[email-masked]>
Date: Thu, 19 May 2011 16:19:11 -0400

> (maybe just impression purpose).

I guess we could remove it, but I don't think it's really doing any harm.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Bruce Momjian <[email-masked]>
Date: Sat, 10 Sep 2011 09:24:50 -0400 (EDT)

Robert Haas wrote:
> > "NOTE 30 ? If MATCH FULL or MATCH PARTIAL is specified for a

I find the MATCH FULL makes the example less real-world accurate, so I
removed the specification from the example.

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +