Search Postgresql Archives

Re: The same prepared query yield "-1" the first six times and then "-1.0"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, Aug 21, 2023 at 8:28 AM Edoardo Panfili <edoardo.panfili@xxxxxxxxxxxxxxxx> wrote:

   dim1 real DEFAULT '-1' NOT NULL

     System.out.print("p: "+rs.getString("dim1")+"\n”);

Can I do something to avoid this problem?

Use the type appropriate getter, not getString, to retrieve the value of the underlying real typed column.

Otherwise, I agree this seems like a bug, probably in the JDBC driver, though one pertains to style as opposed to semantics since both answers are technically correct.

David J.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux