Re: Getting closer with functions, but... - Mailing list pgsql-general

From Tom Lane
Subject Re: Getting closer with functions, but...
Date
Msg-id 27122.963462731@sss.pgh.pa.us
Whole thread Raw
In response to Getting closer with functions, but...  (Scott Holmes <sholmes@pacificnet.net>)
List pgsql-general
Scott Holmes  <sholmes@pacificnet.net> writes:
> Is there a syntax that will allow me to build an sql statement for use
> in theis funcation (ie delete from stxnoted where filename = fname and
> record_key = rkey).

Not in plpgsql, because it wants to precompile the queries, so you can't
determine table or field names at runtime, just substitute values for
constants.

pltcl doesn't precompile, so it should do what you want (at a price in
performance of course).  I think plperl works like pltcl, if you prefer
perl over tcl.

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Holmes
Date:
Subject: Getting closer with functions, but...
Next
From: Erich
Date:
Subject: References on functions?