Re: Primary Key with serial

Поиск
Список
Период
Сортировка
От Berend Tober
Тема Re: Primary Key with serial
Дата
Msg-id 47EE742E.3040901@ct.metrocast.net
обсуждение исходный текст
Ответ на Primary Key with serial  ("x asasaxax" <xanaruto@gmail.com>)
Ответы Re: Primary Key with serial  ("x asasaxax" <xanaruto@gmail.com>)
Список pgsql-general
x asasaxax wrote:
>    I have the following table    create table product(cod serial, user_cod
> bigint, constraint product_fk Foreign Key(user_cod) references user(cod),
> constraint product_pk Primary Key(cod, user_cod));
>
> What i want to happend is that:
> user_cod            cod
> 1                         1
> 1                         2
> 1                         3
> 2                         1
> 3                         1
> 3                         2
>
 > Can serial do that? ...

No.

 > ...what can  i do to make this happen?


http://archives.postgresql.org/pgsql-general/2006-08/msg00744.php



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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: GSoC Proposal: PL/Mono
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Using tables in other PostGreSQL database