Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A123D475D0D for ; Wed, 18 Dec 2002 12:50:34 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 0E278475CBC for ; Wed, 18 Dec 2002 12:50:34 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id gBIHoTpd008027; Wed, 18 Dec 2002 12:50:30 -0500 (EST) To: Gary Stainburn Cc: Tomasz Myrta , pgsql-sql@postgresql.org Subject: Re: references table(multiple columns go here) In-reply-to: <200212181718.42870.gary.stainburn@ringways.co.uk> References: <200212181625.11316.gary.stainburn@ringways.co.uk> <3E00A678.5070605@klaster.net> <200212181656.13432.gary.stainburn@ringways.co.uk> <200212181718.42870.gary.stainburn@ringways.co.uk> Comments: In-reply-to Gary Stainburn message dated "Wed, 18 Dec 2002 17:18:42 +0000" Date: Wed, 18 Dec 2002 12:50:29 -0500 Message-ID: <8026.1040233829@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/229 X-Sequence-Number: 10817 Gary Stainburn writes: > I've just tried this on a 7.2.1-5 system and get the same error. >> create table jobtypes ( >> jid int4 default nextval('jobs_jid_seq'::text) unique not null, >> jdid character, -- This joint reference >> jrank int4 not null references ranks(rrank), -- needs sorting >> jdesc character varying(40), -- job description >> contraint c2 foreign key (jdid,jrank) references ranks (rdid,rrank) ^^^^^^^^^ >> ); >> ERROR: parser: parse error at or near "foreign" If that's an accurate transcription, I think "contraint" -> "constraint" would help... regards, tom lane