Re: Dynamic plpgsql code

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Natasa Bulatovic" <n(dot)bulatovic(at)zim(dot)mpg(dot)de>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dynamic plpgsql code
Date: 2003-07-10 08:33:47
Message-ID: 200307100933.47900.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno BAGUETTE 2003-07-10 10:44:48 What about a comp.databases.postgresql usenet newsgroup ???
Previous Message Csaba Nagy 2003-07-10 08:23:54 Re: IIRC + intervals + and other things