Re: Create functions using a function - Mailing list pgsql-sql

From Jasen Betts
Subject Re: Create functions using a function
Date
Msg-id hmt1q0$9u8$1@reversiblemaps.ath.cx
Whole thread Raw
In response to Create functions using a function  (Gianvito Pio <pio.gianvito@gmail.com>)
List pgsql-sql
On 2010-03-01, Gianvito Pio <pio.gianvito@gmail.com> wrote:
> --001485f44fc07594a40480c43c01
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi all,
> is there a way to define functions and/or triggers in a function?

assuming plpgsql: execute

> For example, can I create a function that takes an argument and defines a
> function that has the name passed as argument to the first function?
>
> Something like this .....
CREATE FUNCTION test (name text) RETURNS VOID AS $$BEGIN
  EXECUTE 'CREATE FUNCTION '||quote_ident(name)||   ...      END $$ LANGUAGE PLPGSQL;



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Does IMMUTABLE property propagate?
Next
From: Jasen Betts
Date:
Subject: Re: Does IMMUTABLE property propagate?