I have a table, which has a column "description" of type TEXT. If I do:
SELECT id, description FROM table_name;
I see in "description" column instead of text value a number. Is there any way to see the text value?
Edit: After some testing I found out why I see numbers, but others like Craig see real text. It's because the data are inserted using Hibernate.
Entity:
@Entity
public class Settings {
@Id
@GeneratedValue
private Integer id;
@Column(nullable = false, unique = true)
private String key;
@Lob
@Column(nullable = false, length = Integer.MAX_VALUE)
private String value;
// getters and setters
}
Log result:
Hibernate: create table Settings (id int4 not null, key varchar(255) not null, value text not null, primary key (id));
Hibernate: select nextval ('hibernate_sequence')
Hibernate: insert into Settings (key, value, id) values (?, ?, ?)
16:05:32,718 TRACE BasicBinder:81 - binding parameter [1] as [VARCHAR] - [GoogleSiteVerification]
16:05:32,718 TRACE BasicBinder:81 - binding parameter [2] as [CLOB] - []
16:05:32,726 TRACE BasicBinder:81 - binding parameter [3] as [INTEGER] - [4]
If I do in pgAdmin3 this select:
select * from settings;
I see this result:
1;"GoogleSiteVerification";"112351"