Re: primary keys - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: primary keys
Date
Msg-id 3DCA7D62.2070806@klaster.net
Whole thread Raw
In response to primary keys  (Huub <v.niekerk@freeler.nl>)
List pgsql-sql
Uz.ytkownik Huub napisa?:> Hi,>> I want to create a table which has 2 columns, and both columns have to> be primary key
(or:together they are the primary key). How can I do> this using SQL? Using pgAdminII for Postgres7.2.2 on RH8.
 
Dependent on what you need:
1) you can create primary key based on 2 fields
2) you can't create 2 primary keys - but you can create primary key on 
first field and create unique index on second one.
Tomasz Myrta



pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: PLpgSQL FOR IN EXECUTE question
Next
From: kkennedy@kenzoid.com (Ken Kennedy)
Date:
Subject: Re: how to get the source table & field name of a view field