Re: [SQL] composite primary keys.

From: Dave <david(at)morgana(dot)estadistica(dot)unam(dot)mx>
To: Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)uk>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] composite primary keys.
Date: 1998-09-04 14:49:47
Message-ID: Pine.LNX.3.96.980904094302.9959A-100000@morgana.estadistica.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)estadistica(dot)unam(dot)mx
----------------------------------------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message G. Anthony Reina 1998-09-04 18:38:45 DECLARE BINARY CURSOR problem
Previous Message Stuart Rison 1998-09-04 14:21:05 [SQL] composite primary keys.