On 2/3/07, elein <elein@xxxxxxxxxxx> wrote:
On Tue, Jan 30, 2007 at 12:32:04PM -0800, Karen Hill wrote: > Is it possible to have a pl/pgsql function take another pl/pgsql > function as one of the parameters?
I think that OP meant (correct me if I'm wrong!) to be able to do something like: create function bar(text) returns text as $$ select $1 || 'xyz'; $$ language sql; create function something_complex(regprocedure) returns void as [...] language plpgsql; select something_complex(bar(text)); ...so you pass the callback 'bar' to the complex function which executes it over something. This isn't possible currently, but you can fudge it with dynamic sql for simple things (no arrays, records, or cursors), or work up something more general solution with a C go-between. merlin