Re: Parse error creating tables - Mailing list pgsql-novice

From Tom Lane
Subject Re: Parse error creating tables
Date
Msg-id 8139.992894788@sss.pgh.pa.us
Whole thread Raw
In response to Parse error creating tables  (Juan Jose Natera Abreu <jnatera@net-uno.net>)
List pgsql-novice
Juan Jose Natera Abreu <jnatera@net-uno.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

pgsql-novice by date:

Previous
From: Frank Hilliard
Date:
Subject: Display version
Next
From: "Robby Slaughter"
Date:
Subject: Insert into two tables