I have an idea, let me know what you all think. rather than do:
select sum( field) from largetable I want (need) to be able to do something like this: select setval('myseq', select sum(field) from largetable); and in a trigger SELECT addval('myseq', field_size); I have already created this function and am testing it. I basically took "nextval" and assigned "byval" to a parameter and removed the value caching code. Anyway, I'm not quite getting the idea of caching sequence values. I understand the performance benefits, but it seems problematic across multiple backends, almost ensuring "holes" in the sequence of numbers. ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])