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.0106220822240.14272-100000@hamster.lee.net
обсуждение исходный текст
Ответ на Suggested improvement : Adjust SEQUENCES to accept an INCREMENT of functionname(parameters) instead of an integer  (Justin Clift <aa2@bigpond.net.au>)
Список pgsql-general
On Fri, 22 Jun 2001, Justin Clift wrote:

> 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.

It's called a trigger.  Just take out the sequence, and build a trigger
that does this for you.   That's why Postgres has them, after all.


--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| 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 по дате отправления:

Предыдущее
От: Mike Haberman
Дата:
Сообщение: Adding Foreign Key constraints outside of table def.
Следующее
От: "Patrick Collin"
Дата:
Сообщение: newbie cursor problem