title: store strings of arbitrary length in Postgresql
body: <p>I have a Spring application which uses JPA (<strong>Hibernate</strong>) initially created with Spring Roo. I need to store Strings with arbitrary length, so for that reason I've annotated the field with <strong>@Lob</strong>:</p>
  
  <pre><code>public class MyEntity{
  
      @NotNull
      @Size(min = 2)
      @Lob
      private String message;
  
      ...
  }
  </code></pre>
  
  <p>The application works ok in localhost but I've deployed it to an external server and it a problem with encoding has appeared. For that reason I'd like to check if the data stored in the PostgreSQL database is ok or not. The application creates/updates the tables automatically. And for that field (message) it has created a column of type:</p>
  
  <blockquote>
    <p>text NOT NULL</p>
  </blockquote>
  
  <p>The problem is that after storing data if I browse the table or just do a SELECT of that column I can't see the text but numbers. Those numbers seems to be identifiers to "somewhere" where that information is stored.</p>
  
  <p>Can anyone tell me exactly what are these identifiers and if there is any way of being able to see the stored data in a @Lob columm from a pgAdmin or a select clause?</p>
  
  <p>Is there any better way to store Strings of arbitrary length in JPA?</p>
  
  <p>Thanks.</p>