X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4E985E46E1 for ; Fri, 6 Aug 2004 15:25:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67832-03 for ; Fri, 6 Aug 2004 18:25:17 +0000 (GMT) Received: from mailgate.cubis.de (send.cubis.de [195.226.172.140]) by svr1.postgresql.org (Postfix) with ESMTP id ABB5A5E46DF for ; Fri, 6 Aug 2004 15:25:13 -0300 (ADT) Received: from mailscan-1.tuev-mitte.de (mailscan-1.tuev-mitte.de [10.0.142.44] (may be forged)) by mailgate.cubis.de (Switch-2.2.9/Switch-2.2.4) with SMTP id W76I0P5H00001370 for ; Fri, 06 Aug 2004 20:25:06 +0200 Received: From mailscan-2.tuev-mitte.de ([10.0.142.43]) by mailscan-1.tuev-mitte.de (WebShield SMTP v4.5 MR1a P0803.345); id 1091816707892; Fri, 6 Aug 2004 20:25:07 +0200 Received: From sn-e0310.ek.secunet.de ([10.36.13.215]) by mailscan-2.tuev-mitte.de (WebShield SMTP v4.5 MR1a P0803.354); id 1091816707122; Fri, 6 Aug 2004 20:25:07 +0200 Received: from sn-e0310.ek.secunet.de (localhost [127.0.0.1]) by sn-e0310.ek.secunet.de (Postfix) with ESMTP id 6681457A84 for ; Fri, 6 Aug 2004 20:25:02 +0200 (CEST) To: pgsql-sql@postgresql.org Subject: UNIQUE constraint From: Sascha Ziemann Date: 06 Aug 2004 20:25:02 +0200 Message-ID: Lines: 36 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/53 X-Sequence-Number: 18550 Hi, I have a question about the UNIQUE constraint. The documentation describes this example: CREATE TABLE example ( a integer, b integer, c integer, UNIQUE (a, c) ); But it is not clean to me. Does the above example mean that the list of pairs must be unique or is it only a short version for this constraint: CREATE TABLE example ( a integer UNIQUE, b integer, c integer UNIQUE ); Does the following table fullfill the UNIQUE clause of the example from the Postgres documentation? a b c ----- 1 2 3 1 1 1 cu Sascha -- secunet Security Networks AG, Im Teelbruch 116, 45219 Essen Tel: +49-2054-123-408 Fax: +49-2054-123-123 PGP: FBE2 A49B 6526 C1B4 7F10 24E4 5004 7C27 6E9A 9698