Re: How-to question: pre-parsing and pre-planning dynamic sql statements - Mailing list pgsql-general

From Merlin Moncure
Subject Re: How-to question: pre-parsing and pre-planning dynamic sql statements
Date
Msg-id AANLkTikAzH5Z9N3bOsmk0q_Bt2FjxxWm8raTxY6zfTzT@mail.gmail.com
Whole thread Raw
In response to How-to question: pre-parsing and pre-planning dynamic sql statements  ("Davor J." <DavorJ@live.com>)
List 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 by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: An aggregate function on ARRAY
Next
From: Tom Lane
Date:
Subject: Re: Is there a way to bypass sql?