prepared statement: are they pre-compiled?

From: Flipper <flipper(at)gammadue(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: prepared statement: are they pre-compiled?
Date: 2007-07-05 08:23:25
Message-ID: 200707051023.25650.flipper@gammadue.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi all,
a little question about prepared statement. I know that one advantage of using
prepared statement is the fact that the statament could be "precompiled" by
the server before the binding of parameters, is it true?
But while observing the messages sent from the FE to the BE by the postgresql
driver, I noticed that the query is sent along with the bind of the
parameters, that is the when the executeQuery() method is called on the
prepared statement, both the parse and bind messages are sent. I thought the
bind message have to be sent before the bind one, but it seems to me it's
not. Anyone can please help me understand this?

Thanks.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heikki Linnakangas 2007-07-05 08:53:51 Re: prepared statement: are they pre-compiled?
Previous Message Andrew Lazarus 2007-07-03 18:37:39 NULL as an element of an ARRAY