The new driver and PostgreSQL7.1.3

From: Chantal Ackermann <chantal(dot)ackermann(at)web(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: The new driver and PostgreSQL7.1.3
Date: 2001-12-20 18:11:47
Message-ID: 01122019114704.00724@guffert
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello all,

I' d like to use the new postgres driver without installing a new postgres
(for the moment). My current PostgreSQL version is 7.1.3. I downloaded the
driver jdbc7.2dev-1.2.jar. I get a connection, but I still want to be sure
that the name of the jar does not mean that it can't be used together with
the 7.1.3 version of the database.

My second question refers to the PreparedStatement. I would be satisfied with
a link to a precise docu (or an answer, of course).
I have use as data types in my tables CHAR(4) and TEXT (and others). to
insert data into columns containing these data types I use
PreparedStatement.setString(int, String).

I get the Exception:
java.sql.SQLException: ERROR: Unable to identify an operator '='
for types 'int4' and 'text'
You will have to retype this query using an explicit cast

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:94)
at org.postgresql.Connection.ExecSQL(Connection.java:398)
at org.postgresql.jdbc2.Statement.execute(Statement.java:130)
at
org.postgresql.jdbc2.PreparedStatement.execute(PreparedStatement.java:765)
at de.biomax.geda.sql.DBManager.insertGeneData(DBManager.java:300)

the message is quit clear, however, I don't know where and what exactly I
have to cast to make this work. On the other hand, if it would be better to
change the column data types I could do that without problem. I've chosen
CHAR(4) out of performance reasons.

thank you for any help!
chantal

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2001-12-20 18:33:07 Re: The new driver and PostgreSQL7.1.3
Previous Message Dave Cramer 2001-12-20 17:52:08 Re: [JDBC] JDBC Driver Munging My Text?