Обсуждение: PreparedStatement.setBytes on OIDs

Поиск
Список
Период
Сортировка

PreparedStatement.setBytes on OIDs

От
Bill Schneider
Дата:
Is there any way it is possible to make AbstractJdbc1Statement.setBytes work
on both bytea and oid columns?  I found the "compatible" switch to revert
behavior so that the method can be used with oid columns, but I'd hate to
give up the bytea functionality to keep setBytes working with oids.   IMO
there should be some way to get setBytes to work on both simultaneously.

What are other users' thoughts on this?  Is this something that could be
solved with a small patch or would this feature require a significant
redesign of the driver?

-- Bill



Re: PreparedStatement.setBytes on OIDs

От
Kris Jurka
Дата:
The problem is that the driver doesn't know the underlying storage format
for the column.  The driver would have to parse your SQL statement, query
the server's meta data for the various columns, and then determine what
method to use.  This is not going to happen.

Kris Jurka

On Mon, 3 Feb 2003, Bill Schneider wrote:

> Is there any way it is possible to make AbstractJdbc1Statement.setBytes work
> on both bytea and oid columns?  I found the "compatible" switch to revert
> behavior so that the method can be used with oid columns, but I'd hate to
> give up the bytea functionality to keep setBytes working with oids.   IMO
> there should be some way to get setBytes to work on both simultaneously.
>
> What are other users' thoughts on this?  Is this something that could be
> solved with a small patch or would this feature require a significant
> redesign of the driver?
>
> -- Bill
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>