Primary Key with serial

Поиск
Список
Период
Сортировка
От x asasaxax
Тема Primary Key with serial
Дата
Msg-id 91495cb0803281730w395e00e9md8f9e4c41f1a2cd9@mail.gmail.com
обсуждение исходный текст
Ответы Re: Primary Key with serial  (brian <brian@zijn-digital.com>)
Re: Primary Key with serial  (Berend Tober <btober@ct.metrocast.net>)
Список pgsql-general
Hi,


   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? If not, what can  i do to make this happen?

Thanks a lot

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: general optimisation rule for slice of table frequently accessed.
Следующее
От: Alex Adriaanse
Дата:
Сообщение: Re: Out of memory