Re: Dynamic plpgsql code - Mailing list pgsql-general

From Richard Huxton
Subject Re: Dynamic plpgsql code
Date
Msg-id 200307100933.47900.dev@archonet.com
Whole thread Raw
In response to Dynamic plpgsql code  ("Natasa Bulatovic" <n.bulatovic@zim.mpg.de>)
List pgsql-general
On Monday 07 Jul 2003 8:54 am, Natasa Bulatovic wrote:
> Hi dear All,
>
> I wander, is there a way to execute dynamic plpgsql code which is not
> restricted to sql command, but executes plpgsql code itself....
>
> For example... I would like to form dynamically a part of the code which
> contains ...
>
> "if-- end if... raise notice --- "
>
> I have been using such possibilities in Oracle, so pls. tell me if this
> possibility somehow is given in PlPgsql as well?

Well - I wrote a plpgsql function that created a plpgsql function, but that's
about all you could do. There's no "eval()" type of call.

You can, of course execute dynamically formed SQL so that handle some of your
requirements.

--
  Richard Huxton

pgsql-general by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: Dynamic plpgsql code
Next
From: Csaba Nagy
Date:
Subject: Re: IIRC + intervals + and other things