Re: Problems w. SERIAL - Mailing list pgsql-general

From Morten Primdahl
Subject Re: Problems w. SERIAL
Date
Msg-id 3AF7013B.F8C905BC@primdahl.net
Whole thread Raw
In response to Re: Problems w. SERIAL  (Joel Burton <jburton@scw.org>)
List 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

pgsql-general by date:

Previous
From: "Joseph"
Date:
Subject: single quotes in a select statement
Next
From: Gary
Date:
Subject: Postgresql newbie username/password question