postgres jdbc into eclipse plugin (OID problems) - Mailing list pgsql-jdbc

From Diego Zanga
Subject postgres jdbc into eclipse plugin (OID problems)
Date
Msg-id 3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com
Whole thread Raw
Responses Re: postgres jdbc into eclipse plugin (OID problems)
List 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

pgsql-jdbc by date:

Previous
From: Michael Paesold
Date:
Subject: Re: Unable to prepare a statement when the object names contain more than one $ symbol
Next
From: "Marcel Steinbach"
Date:
Subject: incomplete batch-updates