Re: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer
От | Shaun Thomas |
---|---|
Тема | Re: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer |
Дата | |
Msg-id | Pine.LNX.4.33L2.0106280920310.27944-100000@hamster.lee.net обсуждение исходный текст |
Ответ на | Re: Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer (Justin Clift <aa2@bigpond.net.au>) |
Список | 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 | +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
В списке pgsql-general по дате отправления: