dbTalk Databases Forums  

[BUGS] BUG #2708: Saving '\0' to bpchar by jdbc driver 8.1-407.jdbc3

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2708: Saving '\0' to bpchar by jdbc driver 8.1-407.jdbc3 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Shutra
 
Posts: n/a

Default [BUGS] BUG #2708: Saving '\0' to bpchar by jdbc driver 8.1-407.jdbc3 - 10-20-2006 , 07:11 PM







The following bug has been logged online:

Bug reference: 2708
Logged by: Shutra
Email address: zhoushuqun (AT) gmail (DOT) com
PostgreSQL version: 8.1.5-1
Operating system: Windows or Linux
Description: Saving '\0' to bpchar by jdbc driver 8.1-407.jdbc3
Details:

Refer: http://opensource.atlassian.com/proj...rowse/HHH-2161

<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.1-407.jdbc3</version>
</dependency>

User user = new User();
user.setGender('M');
Transaction t = HibernateTest.getSessionFactory().getCurrentSessio n()
..beginTransaction();
HibernateTest.getSessionFactory().getCurrentSessio n().save(user);
t.commit(); //Saved OK.

user = new User();
user.setGender('\1');
t =
HibernateTest.getSessionFactory().getCurrentSessio n().beginTransaction();
HibernateTest.getSessionFactory().getCurrentSessio n().save(user);
t.commit(); // Also saved OK.

user = new User();
user.setGender('\0');
t =
HibernateTest.getSessionFactory().getCurrentSessio n().beginTransaction();
HibernateTest.getSessionFactory().getCurrentSessio n().save(user);
t.commit(); // Failed. That means the '\0' is not supported by the jdbc of
postgresql.

2006-10-20 15:44:23,638 DEBUG [org.hibernate.impl.SessionImpl] - opened
session at timestamp: 11613302636
2006-10-20 15:44:23,638 DEBUG [org.hibernate.transaction.JDBCTransaction] -
begin
2006-10-20 15:44:23,638 DEBUG [org.hibernate.jdbc.ConnectionManager] -
opening JDBC connection
2006-10-20 15:44:23,638 DEBUG [org.hibernate.transaction.JDBCTransaction] -
current autocommit status: false
2006-10-20 15:44:23,638 DEBUG
[org.hibernate.event.def.AbstractSaveEventListener] - generated identifier:
2c90c1710e64ad81010e64ad86560003, using strategy:
org.hibernate.id.UUIDHexGenerator
2006-10-20 15:44:23,653 DEBUG [org.hibernate.transaction.JDBCTransaction] -
commit
2006-10-20 15:44:23,653 DEBUG
[org.hibernate.event.def.AbstractFlushingEventListe ner] - processing
flush-time cascades
2006-10-20 15:44:23,653 DEBUG
[org.hibernate.event.def.AbstractFlushingEventListe ner] - dirty checking
collections
2006-10-20 15:44:23,653 DEBUG
[org.hibernate.event.def.AbstractFlushingEventListe ner] - Flushed: 1
insertions, 0 updates, 0 deletions to 1 objects
2006-10-20 15:44:23,653 DEBUG
[org.hibernate.event.def.AbstractFlushingEventListe ner] - Flushed: 0
(re)creations, 0 updates, 0 removals to 0 collections
2006-10-20 15:44:23,653 DEBUG [org.hibernate.pretty.Printer] - listing
entities:
2006-10-20 15:44:23,653 DEBUG [org.hibernate.pretty.Printer] -
test.hibernate.User{id=2c90c1710e64ad81010e64ad865 60003, username=null,
gender=

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

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 - 2012, Jelsoft Enterprises Ltd.