pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Carl Olivier <carl@zero-one.co.za>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: DatabaseMetaData and Transactions
Date: Tue, 07 Jun 2005 22:59:21 -0400
Message-ID: <26296.1118199561@sss.pgh.pa.us> (raw)
In-Reply-To: <42A613DA.7090300@opencloud.com>
References: <473185057AB4D7118B6C00508B624DDA1C96BB@ALPHENPDC>
	<42A613DA.7090300@opencloud.com>

Oliver Jowett <oliver@opencloud.com> writes:
> You're going to have to pass metadata down, or change your queries to
> explicitly cast the parameters in the SQL itself. The driver has exactly
> the same problem as your code does -- with the v3 protocol it needs to
> provide a type for the parameter, but if it's just provided as a string
> the only type it can assume is text..

Is there any chance of a win in passing the type across to the backend
as "unknown", and seeing if the backend can infer something reasonable?
For example given
	WHERE int4col = ?
it'd be reasonable to infer the type of the ? symbol as int4, and that
logic has been built into the backend since forever.

			regards, tom lane



view thread (9+ messages)  latest in thread

Message-ID: <26296.1118199561@sss.pgh.pa.us>
Permalink:  ../26296.1118199561@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26296.1118199561@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, oliver@opencloud.com, carl@zero-one.co.za
  Subject: Re: DatabaseMetaData and Transactions
  In-Reply-To: <26296.1118199561@sss.pgh.pa.us>
  References: <473185057AB4D7118B6C00508B624DDA1C96BB@ALPHENPDC> <42A613DA.7090300@opencloud.com> <26296.1118199561@sss.pgh.pa.us>

* 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