pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Diego Zanga <naarani@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: postgres jdbc into eclipse plugin (OID problems)
Date: Wed, 11 Jul 2007 11:07:49 +0200
Message-ID: <3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com>
Permalink:  ../3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com/
Also on:    postgresql.org/message-id/3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com

 · 

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: naarani@gmail.com
  Subject: Re: postgres jdbc into eclipse plugin (OID problems)
  In-Reply-To: <3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com>
  References: <3b2806290707110207h1dc1a8a5ld4693c852d830715@mail.gmail.com>

* 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