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: [EMAIL PROTECTED]    AIM  : trifthen                      |
| Web  : hamster.lee.net                                              |
|                                                                     |
|     "Most of our lives are about proving something, either to       |
|      ourselves or to someone else."                                 |
|                                           -- Anonymous              |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to