Re: Problems w. SERIAL

From: Morten Primdahl <morten(at)primdahl(dot)net>
To: Joel Burton <jburton(at)scw(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems w. SERIAL
Date: 2001-05-07 20:10:35
Message-ID: 3AF7013B.F8C905BC@primdahl.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joel Burton wrote:

> re: structure of table C, I think you're misunderstand something
> about SERIALs. A SERIAL is just another name for an int that automatically
> has a sequence set up for it. So, if in table C, you want to store
> references to tables a and b, you want you schema to be:
[snip]
> note the use of INTs, not SERIALs.

You're right, thanks! I assumed that SERIAL was a special data
type like eg. Oracle NUMBER. Using INT4 now as FK and it works like
a charm, thanks again :)

Morten

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2001-05-07 20:36:31 'current' timestamp bug
Previous Message Bruce Momjian 2001-05-07 20:01:48 Re: [GENERAL] Strange notices, should I worry?