Primary Key with serial - Mailing list pgsql-general

From x asasaxax
Subject Primary Key with serial
Date
Msg-id 91495cb0803281730w395e00e9md8f9e4c41f1a2cd9@mail.gmail.com
Whole thread Raw
Responses Re: Primary Key with serial
Re: Primary Key with serial
List 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 by date:

Previous
From: Ivan Sergio Borgonovo
Date:
Subject: general optimisation rule for slice of table frequently accessed.
Next
From: Alex Adriaanse
Date:
Subject: Re: Out of memory