Re: "could not determine data type of parameter" with timestamp

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Rémi Aubel <remi(dot)aubel(at)gmail(dot)com>
Cc: Brad DeJong <bpd0018(at)gmail(dot)com>, Dave Cramer <pg(at)fastcrypt(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: "could not determine data type of parameter" with timestamp
Date: 2018-03-28 09:57:44
Message-ID: CAB=Je-FWcFjqq9m88muVADqfdjP8U_r+a=wY0u2FzkCDMpc0dA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I believe you should use java.sql.PreparedStatement#setNull(int, int,
java.lang.String)

As far as I understand, current implementation ignores typename argument:
https://github.com/pgjdbc/pgjdbc/blob/REL42.2.2/pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java#L1240-L1242
however one can file an issue and/or PR to fix that.

Vladimir

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rémi Aubel 2018-03-28 10:08:35 Re: "could not determine data type of parameter" with timestamp
Previous Message Rémi Aubel 2018-03-28 09:44:59 Re: "could not determine data type of parameter" with timestamp