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

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: "Davor J(dot)" <DavorJ(at)live(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How-to question: pre-parsing and pre-planning dynamic sql statements
Date: 2010-08-11 14:26:29
Message-ID: AANLkTikAzH5Z9N3bOsmk0q_Bt2FjxxWm8raTxY6zfTzT@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 11, 2010 at 8:35 AM, Davor J. <DavorJ(at)live(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2010-08-11 14:46:04 Re: filter tables from database
Previous Message Tom Lane 2010-08-11 14:26:27 Re: Is there a way to bypass sql?