dbTalk Databases Forums  

Bug in boolean columns on win2k

comp.databases.postgresql.bugs comp.databases.postgresql.bugs


Discuss Bug in boolean columns on win2k in the comp.databases.postgresql.bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mads Peter Henderson
 
Posts: n/a

Default Bug in boolean columns on win2k - 09-15-2004 , 02:21 AM






RE-POST: This is a repost. Our mailserver was out of order when sending
this report yesterday, and I can't find the post on the buglist yet.
Sorry for any inconvenience.

BUG:
I have a table with the following column, from "psql \d":
showemail | boolean |

When I try to insert data data into this through jdbc, I get the
following error:
java.sql.SQLException: ERROR: column "showemail" is of type boolean but
expression is of type text
at
org.postgresql.core.v3.QueryExecutorImpl.receiveEr rorResponse(QueryEx
ecutorImpl.java:1130)
at
org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutor
Impl.java:933)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.ja
va:139)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Stat
ement.java:346)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(Abstract
Jdbc2Statement.java:294)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execut eUpdate(AbstractJdb
c2Statement.java:249)

---------------------------------------------------------------------
My environment:
postgreSQL 8.0-beta2-dev3
Win2k sp4 professional
jdbc driver: pgdev.305.jdbc3
java version: 1.4

The error also occured in beta1.

The following statement executed from psql works as expected:

insert into mytable (showemail) values ('true');

--
Thanks
Mads Peter Henderson


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Kris Jurka
 
Posts: n/a

Default Re: Bug in boolean columns on win2k - 09-15-2004 , 11:48 PM








On Wed, 15 Sep 2004, Mads Peter Henderson wrote:

Quote:
I have a table with the following column, from "psql \d":
showemail | boolean |

When I try to insert data data into this through jdbc, I get the
following error:
java.sql.SQLException: ERROR: column "showemail" is of type boolean but
expression is of type text

Are you using something like PreparedStatement.setString to compose this
query? You should be using setBoolean instead I imagine.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.