Serial Foreign Key - Mailing list pgsql-general

From Jonathan Stafford
Subject Serial Foreign Key
Date
Msg-id 7a4211f8050106214565bbab74@mail.gmail.com
Whole thread Raw
Responses Re: Serial Foreign Key  (Michael Glaesemann <grzm@myrealbox.com>)
List 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

pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: Editor: Syntax highlighting and stored procedures surrounded by '
Next
From: "Murali Mohan Kasetty"
Date:
Subject: unsubscribe