Question in dblink

From: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Cc: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
Subject: Question in dblink
Date: 2007-12-06 15:29:20
Message-ID: E9DE7963E5EA6546B42A979EC28B4D0136A2C54C@hou-ex-02.adprod.bmc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I would like the code below to accept the returned value from t2.
How do I do it?
Thanks
Danny

=======================================================

err := dblink_connect('C',cname);
begin
execute dblink('C','SELECT t2()');
exception
when others then null;
end;
err := dblink_disconnect('C');

======================================================
CREATE OR REPLACE FUNCTION t2() RETURNS integer
AS
$$
DECLARE
i integer;
BEGIN
execute 'insert into x values(12)';
return 67;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;
======================================================

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham(at)bmc(dot)com

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-12-06 15:39:20 Re: Understanding how partial indexes work?
Previous Message Obe, Regina 2007-12-06 15:20:51 Re: simple update on boolean