pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
prepareStatement()
2+ messages / 2 participants
[nested] [flat]

* prepareStatement()
@ 2005-07-22 06:40 Michael Allman <msa@allman.ms>
  2005-07-23 07:15 ` Re: prepareStatement() Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Michael Allman @ 2005-07-22 06:40 UTC (permalink / raw)
  To: pgsql-jdbc

Does Postgres's JDBC Connection#prepareStatement(String) method support 
queries that can't be prepared by the backend?  (Namely those that are not 
of the SELECT, INSERT, UPDATE, or DELETE variety?)

Michael



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: prepareStatement()
  2005-07-22 06:40 prepareStatement() Michael Allman <msa@allman.ms>
@ 2005-07-23 07:15 ` Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Oliver Jowett @ 2005-07-23 07:15 UTC (permalink / raw)
  To: Michael Allman <msa@allman.ms>; +Cc: pgsql-jdbc

Michael Allman wrote:
> Does Postgres's JDBC Connection#prepareStatement(String) method support
> queries that can't be prepared by the backend?  (Namely those that are
> not of the SELECT, INSERT, UPDATE, or DELETE variety?)

It supports any query that the backend can parse -- it uses the v3
protocol Parse/Bind messages rather than using the SQL PREPARE statement
so it's not limited to SELECT/INSERT/UPDATE/DELETE.

The main gotcha (just mentioned in my previous email) is that you can
only put parameter placeholders where there is a PARAM terminal in the
server's SQL grammar (i.e. somewhere you could legally put $1, $2, etc)

-O



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-07-23 07:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-22 06:40 prepareStatement() Michael Allman <msa@allman.ms>
2005-07-23 07:15 ` Oliver Jowett <oliver@opencloud.com>

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