Skip site navigation (1) Skip section navigation (2)

Re: DatabaseMetaData and Transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Carl Olivier <carl(at)zero-one(dot)co(dot)za>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: DatabaseMetaData and Transactions
Date: 2005-06-08 02:59:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Oliver Jowett <oliver(at)opencloud(dot)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

In response to


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2005-06-08 03:08:40
Subject: Re: DatabaseMetaData and Transactions
Previous:From: Oliver JowettDate: 2005-06-08 01:48:37
Subject: Re: ResultSet.getObject return type for smallint

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group