pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Tkach <dmitry@openratings.com>
To: Darin Ohashi <DOhashi@maplesoft.com>
Cc: pgsql-jdbc-list <pgsql-jdbc@postgresql.org>
Subject: Re: Prepared Statements
Date: Fri, 18 Jul 2003 17:18:40 -0400
Message-ID: <3F186430.8030908@openratings.com> (raw)
In-Reply-To: <F17255C2B596D3119A5600508B44FA68052EB86B@courier.maplesoft.on.ca>
References: <F17255C2B596D3119A5600508B44FA68052EB86B@courier.maplesoft.on.ca>

>
>
>Just as a data point, both postgresql's documentation for PREPARE 
>
>http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-prepare.html
>
>and IBM's
>
>http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/document.d2w
>/report?fn=db2v7s0sqls0645.htm#HDRPREPH2
>
>imply that only data can be passed in.  Its by implication because they discuss
>the "data" having a "datatype".  I'm not sure this would make sense if you were
>allowed to pass in strings containing SQL syntax.
>
>  
>
That's fine.
I just don't know why you refuse to call a set, containing numbers (or 
strings or whatever else) 'data'...
What about arrays by the way?
Is {1,2,3,4} not 'data' too?

There is a similar problem with arrays in the current driver (that is 
just about to become worth with this patch) too -
the only way I know to send in an array to a statement like

update mytable set array_field = ? where id=?

is, again, to use setObject () with the properly constructed string 
representation of the array
(there is a setArray(), but no way to construct the actual  
java.sql.Array object to pass there)

It sounds like we are about to arrive to the new definition of 'data' as 
"something that is supported by our jdbc driver" :-)

Dima





view thread (105+ messages)  latest in thread

Message-ID: <3F186430.8030908@openratings.com>
Permalink:  ../3F186430.8030908@openratings.com/
Also on:    postgresql.org/message-id/3F186430.8030908@openratings.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: dmitry@openratings.com, DOhashi@maplesoft.com
  Subject: Re: Prepared Statements
  In-Reply-To: <3F186430.8030908@openratings.com>
  References: <F17255C2B596D3119A5600508B44FA68052EB86B@courier.maplesoft.on.ca> <3F186430.8030908@openratings.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