Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 801526324D4 for ; Sun, 6 Jun 2010 19:19:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 27744-10 for ; Sun, 6 Jun 2010 22:18:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta09.emeryville.ca.mail.comcast.net (qmta09.emeryville.ca.mail.comcast.net [76.96.30.96]) by mail.postgresql.org (Postfix) with ESMTP id 4390A63236F for ; Sun, 6 Jun 2010 19:18:55 -0300 (ADT) Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta09.emeryville.ca.mail.comcast.net with comcast id Sm9n1e0041vN32cA9mJtq1; Sun, 06 Jun 2010 22:18:53 +0000 Received: from sz0163.ev.mail.comcast.net ([76.96.26.231]) by omta22.emeryville.ca.mail.comcast.net with comcast id SmJt1e00C4zAJBQ8imJt7D; Sun, 06 Jun 2010 22:18:53 +0000 Date: Sun, 6 Jun 2010 22:18:53 +0000 (UTC) From: robert7390@comcast.net To: pgsql-jdbc@postgresql.org Message-ID: <206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net> Subject: connectivity issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [72.5.59.161] X-Mailer: Zimbra 5.0.19_GA_3172.RHEL5_64 (ZimbraWebClient - FF3.0 (Linux)/5.0.19_GA_3177.RHEL5_64) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/46 X-Sequence-Number: 20616 Hi, I'm getting odd behavior. The proxy function is only inserting SOME values into the table. Otherwise,the operation works fine when the JDBC client is connecting directly to the function in the database, bypassing the proxy function. Here's the plroxy function call on the database "my_proxy"; CREATE OR REPLACE FUNCTION proxy_function.f_one ( bigint, varchar(255), int, out did_insert bool ) AS $$ cluster 'uds'; run on 0; $$ language plproxy strict security invoker; And here's the invoked function on the database "mydatabase". CREATE OR REPLACE FUNCTION proxy_function.f_one ( IN id_val bigint, IN name_val character varying(255), IN carrier_id_in integer, OUT did_insert boolean ) AS $$ BEGIN did_insert := false; if not exists(select id from mytable where id=id_val) then begin insert into mytable (id, name, carrier_id) values (id_val, name_val, carrier_id_in); did_insert := true; end; end if; END; $$ LANGUAGE PLPGSQL VOLATILE STRICT SECURITY DEFINER; I'd appreciate any insight. Thanks Robert