Received: from maia.hub.org (unknown [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 158C21337DBE for ; Mon, 9 May 2011 15:54:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 11409-06 for ; Mon, 9 May 2011 18:54:03 +0000 (UTC) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id 7084F1337C6E for ; Mon, 9 May 2011 15:13:14 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mx1.hub.org (Postfix) with ESMTP id 2F3A63263082 for ; Mon, 9 May 2011 18:13:04 +0000 (UTC) Received: by iwn34 with SMTP id 34so4539544iwn.19 for ; Mon, 09 May 2011 11:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=ItD+eJ63cWx2O+XtKPIgyYp7Q/3V5mtncqheWb9bKUU=; b=cdASDwXLJDI9O1Y4w6J2QUPVCto6yh6QBnu3qhVpzSBlBBgVFcn4UuNz1NwB410bER K1vsf8+W6ny68Y2kPCZQrmjDZKsLRtXM+fzGPvrSBEszxaMQFq4lTiNJZF4f/UhhtA3B cYhI0hCaadjtpODub0DzoKYCess8hzZy02tZA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=p8larQMjZ6Sg1/KagPpM12x9UJu3Sk/R1GnBTMHROOeLF2g7GLx9gDPFXGjeZ2iEfj DCDKlffdWvjwtDuoCmvG25T49SJKj37BnsvQZVycTkyKKaRKYOLzfOPphonI2UNbbbps rIrBM33FV84r4C9qwDEpMnBylKZbUgiwQk4+s= MIME-Version: 1.0 Received: by 10.42.224.198 with SMTP id ip6mr4630461icb.28.1304964733134; Mon, 09 May 2011 11:12:13 -0700 (PDT) Received: by 10.231.12.131 with HTTP; Mon, 9 May 2011 11:12:13 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2011 20:12:13 +0200 Message-ID: Subject: Re: ALTER TABLE doc small thing From: Grzegorz Szpetkowski To: pgsql-docs@postgresql.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201105/38 X-Sequence-Number: 6713 "NOTE 30 =97 If MATCH FULL or MATCH PARTIAL is specified for a referential constraint and if the referencing table has only one column specified in for that referential constraint, or if the referencing table has more than one specified column for that , but none of those columns is nullable, then the effect is the same as if no 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. 2011/5/9 Grzegorz Szpetkowski : > 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. >