Re: references table(multiple columns go here) - Mailing list pgsql-sql

From Gary Stainburn
Subject Re: references table(multiple columns go here)
Date
Msg-id 200212181718.42870.gary.stainburn@ringways.co.uk
Whole thread Raw
In response to Re: references table(multiple columns go here)  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Responses Re: references table(multiple columns go here)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Wednesday 18 December 2002 4:56 pm, Gary Stainburn wrote:
> Hi Tomasz,
[snip]
> > > create table jobtypes (
> > > jid         int4 default nextval('jobs_jid_seq'::text) unique not null,
> > > jdid        character references ranks(rdid),    -- This joint reference
> > > jrank        int4 not null references ranks(rrank),    -- needs sorting
> > > jdesc        character varying(40)    -- job description
> >
> > !!!here!!! ,CONSTRAINT c2 FOREIGN KEY(jid,jdid) REFERENCES ranks
> > (rid,rdid)
>
> Did this come in with 7.2? I get parse error on or near 'FOREIGN'. Note I
> changed the field names to the ones I wanted.

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"
>
> > > );
> >
> > that's all
> > Tomasz Myrta

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



pgsql-sql by date:

Previous
From: Kristopher Yates
Date:
Subject: unsubscribe
Next
From: Tom Lane
Date:
Subject: Re: references table(multiple columns go here)