Dual Primary keys

Поиск
Список
Период
Сортировка
От Bantamess
Тема Dual Primary keys
Дата
Msg-id 001601c3eb31$c2fea8e0$6501a8c0@HOMEWITHLINUX
обсуждение исходный текст
Ответы Re: Dual Primary keys  (Bruno Wolff III <bruno@wolff.to>)
Re: Dual Primary keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Dual Primary keys  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-novice
Hello can any body tell me how to code a table with dual primary keys? The table 'borrower' has two PKs each one has been used in other tables within the same schema as single PKs
 
Here is what I have tried:
create table borrower(user_id int primary key,
issn varchar(15) primary key);
Error: create table / primary key  multiple primary keys for table 'borrower' are not allowed.
 
I also tried this:
create table borrower(user_id int ,
issn varchar(15),
primary key user_id, issn);
ERROR: parser: parse error at or near "user_id" at character 68
and
create table borrower(user_id int ,
issn varchar(15),
(primary key user_id, issn));
 ERROR: parser: parse error at or near "( " at character 56
thanks
Janet

В списке pgsql-novice по дате отправления:

Предыдущее
От: george young
Дата:
Сообщение: Re: pg_atoi error
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Dual Primary keys