title: PostgreSQL: selecting large objects (e.g., text) non programmatically (with a tool)
body: <p>We are using PostgreSQL with JPA which maps large strings to columns with type <code>TEXT</code>.</p>
  
  <p>While programmatically we are able to read and write the data, pgAdmin and psql just show me the object ID when I select the data.</p>
  
  <p>Is there a way/tool to quickly select the data without having to use some API (e.g., JDBC)?</p>
  
  <p>An example:</p>
  
  <pre><code>doi=&gt; \d+ xmlsnippet;
                             Table "doi.xmlsnippet"
      Column    |          Type          | Modifiers | Storage  | Description 
  --------------+------------------------+-----------+----------+-------------
   dbid         | bigint                 | not null  | plain    | 
   version      | bigint                 | not null  | plain    | 
   datasnippet  | text                   |           | extended | 
   doi          | character varying(255) |           | extended | 
   doipool_dbid | bigint                 |           | plain    | 
  </code></pre>
  
  <p>The column <code>datasnippet</code> contains some large strings (with XML code)</p>
  
  <p>When I select it, I get</p>
  
  <pre><code>doi=&gt; select * from xmlsnippet;
   dbid  | version | datasnippet |           doi            | doipool_dbid 
  -------+---------+-------------+--------------------------+--------------
      43 |       0 | 282878      | 10.3929/ethz-a-000077127 |           13
      44 |       0 | 282879      | 10.3929/ethz-a-000085677 |           13
      45 |       0 | 282880      | 10.3929/ethz-a-000085786 |           13
      46 |       0 | 282881      | 10.3929/ethz-a-000087642 |           13
      47 |       0 | 282882      | 10.3929/ethz-a-000088898 |           13
  
                     ^^^^^^^
  </code></pre>
  
  <p><strong>Edit</strong>: if I perform the same query using JDBC I get the expected content (the text I stored in the column)</p>