Re: [SQL] composite primary keys. - Mailing list pgsql-sql

From Dave
Subject Re: [SQL] composite primary keys.
Date
Msg-id Pine.LNX.3.96.980904094302.9959A-100000@morgana.estadistica.unam.mx
Whole thread Raw
In response to [SQL] composite primary keys.  (Stuart Rison <stuart@ludwig.ucl.ac.uk>)
List pgsql-sql
> Dear All,
>
> Does postgreSQL 6.3.2 support composite primary keys?  If so, how do you
> implement these?

Let me know if I understand...

Do you want to build primary keys with more than one element ???

Try with:

    create table t1 ( field1 int, field2 int, field3 int,
                      primary key (field1,field2));

The primary key can contain as many elements as you want. But if what you
want is to activate referential integrity constraints, read about SPI in
your documentation.

Buena Suerte Amigo !!

_______________________________________
David Martinez Cuevas
Direccion General de Estadistica, UNAM - Mexico
Tel. 622-60-80
E-mail david@estadistica.unam.mx
----------------------------------------


pgsql-sql by date:

Previous
From: Stuart Rison
Date:
Subject: [SQL] composite primary keys.
Next
From: "G. Anthony Reina"
Date:
Subject: DECLARE BINARY CURSOR problem