Search Postgresql Archives

Re: Primary Key with serial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux