On Wed, Mar 28, 2012 at 1:11 PM, Kenneth Tilton <ktilton@xxxxxxxx> wrote: > > > On Wed, Mar 28, 2012 at 1:52 PM, Kenneth Tilton <ktilton@xxxxxxxx> wrote: >> >> First, apologies for being too succinct. I should have reiterated the >> message subject to provide the context: I am just trying to return a row >> from a function and have the caller understand it. Oh, and I am a nooby so >> it is probably something daft. >> >> Second, I just tried returning the row as an out variable and got the same >> result. I'll try messing with the caller... > > > OK, this works in re getting the row back: > > bpa := now_plus_30(NEW); > > But I need to execute an arbitrary function passed in as text, and I now > realize EXECUTE is for SQL and I am trying to use it to "eval" plpgsql and > those are different animals. > > I see no plpgsql equivalent of EXECUTE, ie where I can build up a plpgsql > statement like this: > > execute 'bpa := ' || function_name || '($1)' using NEW into bpa; If all you are doing is assignment into a variable, you can use EXECUTE...INTO...USING. That should work. merlin -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general