Serial Foreign Key

From: Jonathan Stafford <thecabinet(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Serial Foreign Key
Date: 2005-01-07 05:45:38
Message-ID: 7a4211f8050106214565bbab74@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Suppose I have two tables:

create table t1 (
id serial not null
);

create table t2 (
id serial not null,
t1 integer not null,
foreign key (t1) references t1 (id)
);

Should the "t1 integer" actually be a bigint? I ask because when I do
"select * from t1_id_serial" the max_value is much larger than 2^32.
Does this vary from system to system?

Thanks,
jonathan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2005-01-07 06:25:15 Re: warning: pg_query(): Query failed
Previous Message John DeSoi 2005-01-07 02:48:18 Re: Editor: Syntax highlighting and stored procedures surrounded by '