Using char fields with 7.1.3 driver
От | |
---|---|
Тема | Using char fields with 7.1.3 driver |
Дата | |
Msg-id | 40270.208.38.32.236.999825747.squirrel@webmail.submersion.com обсуждение исходный текст |
Ответы |
Re: Using char fields with 7.1.3 driver
|
Список | pgsql-jdbc |
I've found after using a CMP J2EE entity bean, along with the 7.1.3 jdbc driver, queries return the entire char field back while using char(), but varchar returns just the value of the field back. for example, create table test_table( id integer primary key not null, name varchar(255) ); vs. create table test_table( id integer primary key not null, name char(255) ); When returning the name value from the first table it looks something like this (single quotes are in just to show the entire field) 'Name' However, when using the second table this happens: 'Name ' notice the 249 characters of whitespace. I can easily get around this using .trim(), but I'm wondering if that should be in the jdbc driver itself (as I'll have to go through a bit of code looking for string values being returned). Or is this something in the database software itself that you can configure? Also, Is there a "real" Website for the postgres jdbc driver? http://jdbc.postgresql.org seems a little outdated. I wouldn't mind being able to grab the source for the driver and putting in this small fix myself. -Jeff
В списке pgsql-jdbc по дате отправления: