Tom Lane wrote:
> * How should one invoke nextval() and friends on such a sequence?
> Directly applying the existing convention, eg, nextval('sequencename'),
> won't work because those functions are declared to return int4. One
I'm not really a hacker, but why couldn't you simply change nextval to return int8 in
all cases? Presumably there is an automatic (and silent) conversion from int8 to int4
where the range fits? The overhead of creating an int8 return value for an old-style
int4 sequence (and converting it back to int4 for the INSERT/UPDATE) seems very small.
I'm missing something obvious again?
Allan.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html