postgres jdbc into eclipse plugin (OID problems)

From: "Diego Zanga" <naarani(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: postgres jdbc into eclipse plugin (OID problems)
Date: 2007-07-11 09:07:49
Message-ID: 3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Lo,

i'm using postgres jdbc (level 3 ver 8.2-505) into an eclipse
plugin (i'm developing the plugin to simplify db creation
/mantainment, inside some projects).

I've a big problem: the server (?!) receive the same
prepared statment as inside the plugin as outside( during
test, without eclipse), but works differently.
If i do it inside the same OID is set to the parameters, but
while inside ECLIPSE the server do not add <"> after and
before string parameters, while OUTSIDE is set the same
OID, and do it.

I've debugged the jdbc driver and the OID is 1043, sended
to the server:
(it's all called from Jdbc3PreparedStatement class)
class : QueryExecutorImpl
method: private void sendQuery( ..... )

here i've seen that at line 700, the OID is sent to the server

for (int i = 1; i <= params.getParameterCount(); ++i)
pgStream.SendInteger4(params.getTypeOID(i));

After declaring parameters type to server, there is a BIND
of the effective parameters, done by [line 777]
private void sendBind(SimpleQuery query, SimpleParameterList
params, Portal portal) throws IOException {

where the parameter is sended with this command:
params.writeV3Value(i, pgStream); // Parameter value

So, it's the Server to manage the parameters type
eventually adding <"> to string, knowing the OID.

However i could not understand WHY, it does it outside
eclipse and not inside it: this means the jdbc driver
have some problems inside eclipse, and doez not
throw execeptions about this problem, so the server
has some problem managing the prepared statement,
but i dont know what is it, and how to debug it

Any hint?

cya
--
Diego Zanga
------------------------------
Skype NAARANI
http://www.javablog.eu
http://www.elawoffice.it
http://www.blogstudiolegale.eu

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Marcel Steinbach 2007-07-11 12:58:11 incomplete batch-inserts
Previous Message Michael Paesold 2007-07-10 12:47:09 Re: Unable to prepare a statement when the object names contain more than one $ symbol