Thread: serial with int8 ??

serial with int8 ??

From
Janning Vygen
Date:
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

Re: serial with int8 ??

From
Tom Lane
Date:
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