Re: Parse error creating tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Juan Jose Natera Abreu <jnatera(at)net-uno(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Parse error creating tables
Date: 2001-06-18 20:06:28
Message-ID: 8139.992894788@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Juan Jose Natera Abreu <jnatera(at)net-uno(dot)net> writes:
> FOREIGN KEY Distribucion REFERENCES Distribucion(Id)

> I always get parsing errors like:
> parser: parse error at or near "distribucion"

There are supposed to be parentheses around the column list:

FOREIGN KEY (Distribucion) REFERENCES Distribucion(Id)

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Robby Slaughter 2001-06-18 21:18:57 Insert into two tables
Previous Message Frank Hilliard 2001-06-18 19:04:34 Display version