Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer

From: Justin Clift <aa2(at)bigpond(dot)net(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer
Date: 2001-06-22 02:43:32
Message-ID: 01062212433204.13202@justin
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

Am doing some work with sequences at the moment, and I'm finding it would be
useful to have sequences which use an increment amount decided by a function
call, instead of just a straight integer amount (as we presently do).

For my example, I'd use this to add random positive increments (specifically
to avoid easy predictability of the sequence), but it would be quite flexible.

i.e. CREATE SEQUENCE newseq INCREMENT trunc(random() * 10);

Could do the same for the START, MINVALUE and MAXVALUE parameters also.

Would others also benefit from this alteration? If so, we might like to ask
for it to be added to Bruce's TODO list.

Regards and best wishes,

Justin Clift

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-06-22 03:13:44 Re: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer
Previous Message Justin Clift 2001-06-22 02:10:51 Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer