From: Gianvito Pio <pio.gianvito@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Create functions using a function
Date: Mon, 1 Mar 2010 22:50:23 +0100
Message-ID: <5eca56861003011350pdc14fa5l2498c260bf68a90c@mail.gmail.com> (raw)
Hi all,
is there a way to define functions and/or triggers in a function?
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 varchar) RETURNS VOID AS $$
BEGIN
CREATE FUNCTION name ( ) (here "name" should be expanded to the
variable content) RETURNS ....
...
END
$$
Is there a way to do this? Thanks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: pio.gianvito@gmail.com
Subject: Re: Create functions using a function
In-Reply-To: <5eca56861003011350pdc14fa5l2498c260bf68a90c@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox