Re: How-to question: pre-parsing and pre-planning dynamic sql statements

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: How-to question: pre-parsing and pre-planning dynamic sql statements
Дата
Msg-id AANLkTikAzH5Z9N3bOsmk0q_Bt2FjxxWm8raTxY6zfTzT@mail.gmail.com
обсуждение исходный текст
Ответ на How-to question: pre-parsing and pre-planning dynamic sql statements  ("Davor J." <DavorJ@live.com>)
Список pgsql-general
On Wed, Aug 11, 2010 at 8:35 AM, Davor J. <DavorJ@live.com> wrote:
> Suppose you have a table CREATE TABLE tbl_formulas (formula_id integer,
> formula text)
>
> The formula field can be any postgres-supported mathematical operation which
> references some input data with $1 like "sin($1) + cos($1)" and returns one
> numeric value. Such formulas should be used in the SELECT clause and should
> be executed quickly for each data (real/double).

why do you need to put the formula into a table...how about making functions?

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: An aggregate function on ARRAY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is there a way to bypass sql?