Обсуждение: best way for constants in the database

Поиск
Список
Период
Сортировка

best way for constants in the database

От
chester c young
Дата:
anybody have a good way to impliment constants in the database?

using an immutable pgpgsql function, constant_name() - works, but not
necessarily very efficient.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: best way for constants in the database

От
"Owen Jacobson"
Дата:
chester c young wrote:

> anybody have a good way to impliment constants in the database?
>
> using an immutable pgpgsql function, constant_name() - works, but not
> necessarily very efficient.

A function declared IMMUTABLE should be efficient enough; it'll usually be evaluated once per query at most.  The real
answeris, as usual, "it depends."  What're you trying to accomplish with a constant?