error: operator does not exist: bigint = character varying

Поиск
Список
Период
Сортировка
От Edoardo Panfili
Тема error: operator does not exist: bigint = character varying
Дата
Msg-id 4682D2C9.1010406@aspix.it
обсуждение исходный текст
Ответы Re: error: operator does not exist: bigint = character varying  (Oliver Jowett <oliver@opencloud.com>)
Re: error: operator does not exist: bigint = character varying  (Oliver Jowett <oliver@opencloud.com>)
Re: error: operator does not exist: bigint = character varying  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Hi,

I am updating from 8.2.4 to 8.3dev
the jdbc driver is postgresql-8.3dev-600.jdbc3.jar

Now my application raises this exception (all was ok with 8.2):
org.postgresql.util.PSQLException: ERROR: operator does not exist:
bigint = character varying

this is my code fragment
----------------------------------------------------------------------
PreparedStatement ps = connessione.prepareStatement("SELECT
strato.idplot, strato.idstrato, strato.nome, strato.copertura,
strato.altezza, strato.note FROM plot WHERE idplot=?");
ResultSet risultatoStrati;
ps.setString(1, rilievo.dato[Rilievo.ID]);
risultatoStrati  = istruzioneStrati.executeQuery();
----------------------------------------------------------------------
The error is in the last istruction, it seems that I am doing somehing
not clean with types.

the type of idplot is
"idplot integer NOT NULL DEFAULT nextval('sequenza_plot'::regclass)"

I did a try with
ps.setInt(1, Integer.parseInt(rilievo.dato[Rilievo.ID]));

but nothing is changed.

Whath I am doing wrong?

If I exec "SELECT
strato.idplot,strato.idstrato,strato.nome,strato.copertura,strato.altezza,strato.note
FROM strato WHERE idplot=567" from pgadmin all goes well.

thank you
Edoardo

--
Jabber: edoardopa@talk.google.com
tel: 075 9142766

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Kalle Hallivuori"
Дата:
Сообщение: Stream Copy for 8.1 - 8.3dev
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: error: operator does not exist: bigint = character varying