pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: robert7390@comcast.net
To: pgsql-jdbc@postgresql.org
Subject: connectivity issues
Date: Sun, 6 Jun 2010 22:18:53 +0000 (UTC)
Message-ID: <206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net> (raw)

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 




Message-ID: <206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net>
Permalink:  ../206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net/
Also on:    postgresql.org/message-id/206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: robert7390@comcast.net
  Subject: Re: connectivity issues
  In-Reply-To: <206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net>
  References: <206574116.836821275862733501.JavaMail.root@sz0163a.emeryville.ca.mail.comcast.net>

* 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