Foreign Key in PostGreSQL - Mailing list pgsql-hackers

From Filipi Damasceno Viana
Subject Foreign Key in PostGreSQL
Date
Msg-id 199906022029.RAA01953@europa.em.pucrs.br
Whole thread Raw
List pgsql-hackers
I am a universitary student from BRASIL, and I�m using PostGreSQL data base.
I�m designing my data base and I have one question.
How to create a foreing key in PostGreSQL.
I�m using the following command:
CREATE TABLE test(
pnr char(10),
nome char(20),
id   decimal REFERENCE <parent table>);

and

CREATE TABLE test(
pnr char(10),
nome char(20),
id decimal,
FOREING KEY (id) REFERENCES <parent table>);

Where parent table is the table with the primary key.

Regards

Filipi Damasceno Vianna
&
Alessandro Orso


pgsql-hackers by date:

Previous
From: "Nat Howard"
Date:
Subject: RE: [HACKERS] Re: [SQL] Column name's length
Next
From: David Sauer
Date:
Subject: current CVS snapshot of pgsql crash ...