From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | 夏 飛 <kavi314(at)icloud(dot)com> |
Cc: | List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: One question about connection parameter stringtype |
Date: | 2014-05-29 10:27:08 |
Message-ID: | CADK3HH+FnJwYXh25ndjuH8xaFnG0MhatMAf+pVuER8XG0dJ1uQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I suspect specifying strings in setString is faster on the backend
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On 29 May 2014 05:31, 夏 飛 <kavi314(at)icloud(dot)com> wrote:
> Hi,
>
> When i run my program which use pgjdbc,a error happened.
>
>
> my program looks like the following:
>
> PreparedStatement pstmt = con.prepareStatement("select 1=?");
> pstmt.setString(1, null);
> pstmt.executeUpdate();
>
> error message:
> operator does not exist: integer = character varying
>
> The error's resean is just as the error message said, and i known this can
> be avoided
> by set stringtype=unspecified in url. But i still have two question。
>
> 1)when stringtype is setted to be "unspecified",is there any bad think
> would happen?
>
> 2)If the answer of 1)is "nothing",why pgjdbc not setting the default value
> of stringtype to "unspecified"
>
> kavi314
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>
From | Date | Subject | |
---|---|---|---|
Next Message | David Wall | 2014-06-01 06:41:02 | Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST" |
Previous Message | Dave Cramer | 2014-05-29 10:25:40 | Re: getFastLong gets longs slowly |