PostgreSQL and eval()

From: Mark Morgan Lloyd <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk>
To: pgsql-general(at)PostgreSQL(dot)org
Subject: PostgreSQL and eval()
Date: 2008-12-10 08:54:50
Message-ID: gho04r$j4j$1@pye-srv-01.telemetry.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I had to do some repeated ad-hoc queries yesterday for a report that was
needed in a hurry, and found myself doing repeated editing of an
embedded function name.

If one wants to store the name of a function in a table for subsequent
use in customised queries is the only way to use it by coding an eval()
function using PL/pgSQL's execute?

I appreciate that I could create a function on the fly as a wrapper of
the one that was to be called, but again that takes manual editing.

Alternatively I appreciate that I could use PL/pgSQL but that would
assume that if I sent the sequence of operations to somebody else that
he also had it compiled into his server.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steffn 2008-12-10 09:39:51 c function - undefined symbols
Previous Message Schwéger Gábor 2008-12-10 08:17:54 Re: equal and like