Re: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer
Shaun Thomas <sthomas@townnews.com>
From: Shaun Thomas <sthomas@townnews.com>
To: Justin Clift <aa2@bigpond.net.au>
Cc: Matt Beauregard <matt@designscape.com.au>, <pgsql-general@postgresql.org>
Date: 2001-06-28T13:27:53Z
Lists: pgsql-general
On Wed, 27 Jun 2001, Justin Clift wrote: > Hi Matt, > > I'm looking for a way to change an existing sequence's "increment" value on > the fly (after it's being created). > > Can't seem to find a function which does this either. Being able to change > the increment every now and again would provide useful in some scenario's. Unfortunately, there is no "alter sequence" syntax in Postgres as of yet. You could emulate this by having a trigger address a config table of some sort where you have a column defining the increment size. Then all you'd have to do is change the increment size. Sadly, that would give you a performance hit on inserts. Postgres has a ton of missing "alter" syntax, you just have to learn to live with it. I'm not all that happy with it, either. -- +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ | Shaun M. Thomas INN Database Programmer | | Phone: (309) 743-0812 Fax : (309) 743-0830 | | Email: sthomas@townnews.com AIM : trifthen | | Web : hamster.lee.net | | | | "Most of our lives are about proving something, either to | | ourselves or to someone else." | | -- Anonymous | +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+