serial with int8 ??

Started by Janning Vygenover 24 years ago2 messagesgeneral
Jump to latest
#1Janning Vygen
vygen@gmx.de

hi,

serial seems to be limited to use int4.
usually i use serial for the primary key, but what to do if you
expect more than 4.000.000.000 rows (or whatever is the exact limit)

Does anybody has written a function which creates a unique ID, like
the usual approach using time and pid...

or is tehre another way around this problem? maybe a sequence with
int8??

thanks in advance
janning

--
Planwerk 6 /websolutions
Herzogstra�e 86
40215 D�sseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Janning Vygen (#1)
Re: serial with int8 ??

Janning Vygen <vygen@gmx.de> writes:

serial seems to be limited to use int4.

In 7.2, sequences are based on int8 and there are both "serial"
and "serial8" pseudo-datatypes.

regards, tom lane