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

From: Shaun Thomas <sthomas(at)townnews(dot)com>
To: Justin Clift <aa2(at)bigpond(dot)net(dot)au>
Cc: Matt Beauregard <matt(at)designscape(dot)com(dot)au>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer
Date: 2001-06-28 13:27:53
Message-ID: Pine.LNX.4.33L2.0106280920310.27944-100000@hamster.lee.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)townnews(dot)com AIM : trifthen |
| Web : hamster.lee.net |
| |
| "Most of our lives are about proving something, either to |
| ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Namrata 2001-06-28 13:30:41 Binary Data Storage?
Previous Message Aldo Vadillo Batista 2001-06-28 12:53:24 About pg_dump