Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7556325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:50:20+00:00 2026-05-30T11:50:20+00:00

We are using PostgreSQL with JPA which maps large strings to columns with type

  • 0

We are using PostgreSQL with JPA which maps large strings to columns with type TEXT.

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.

Is there a way/tool to quickly select the data without having to use some API (e.g., JDBC)?

An example:

doi=> \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    | 

The column datasnippet contains some large strings (with XML code)

When I select it, I get

doi=> 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

                   ^^^^^^^

Edit: if I perform the same query using JDBC I get the expected content (the text I stored in the column)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:50:21+00:00Added an answer on May 30, 2026 at 11:50 am

    Perhaps one of “the usual suspects” (i.e. JPA / Hibernate / PostgreSQL JDBC driver) mapped the column into the “Large Object” system of PostgreSQL.

    A quick test in the psql shell:

    db=> \lo_export 282878 /tmp/x.txt
    lo_export
    

    would export the stuff referenced by the first id from your example into the file /tmp/x.txt. Examine it with an editor. Tell us whether that’s your data or not.

    If this kind of mapping really happened, then you have a maintenance problem – large object must be deleted by hand and have some other intrinsic shortcomings. But that’s another story.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I write an application based on an already existing database (postgreSQL) using JPA and
I'm seeing strange behaviour when using PostgreSQL in a Hibernate/JPA environment with a single
I'm using eclipselink as JPA Implementation and PostgreSQL and want to store SHA-1 Hashes
I'm using PostgreSQL full text search for a project where traditional stop words ('a',
I am using PostgreSQL 8.4 on Ubuntu. I have a table with columns c1
Using PostgreSQL triggers, is it possible to record the changes that have happened to
I've been using PostgreSQL a little bit lately, and one of the things that
Right now we are using PostgreSQL 8.3 (on Linux) as a database backend to
I am using PostgreSQL in a project I am working on, and one of
Since I'm using Postgresql and can't use LINQ to SQL, I wrote my own

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.