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

  • Home
  • SEARCH
  • 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 7603697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:43:17+00:00 2026-05-30T23:43:17+00:00

I have a PostgreSql db that has several OID fields. The data to these

  • 0

I have a PostgreSql db that has several OID fields. The data to these fields has been inserted using the lo_import command.

But I am not able to backup the database and restore it in another server. If I try to do so, all the text entries get restored and the OID fields have a OID value, but doing an lo_export gives me an error like the File does not exist.

What is it that I am doing wrong here?


[Edit:] Ok, I have found that the DB backup actually works but I have another unique problem. My DB server and my HTTP server are on different machines. So now my question is how do I retrieve the image in the HTTP server from the image server?

  • 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-30T23:43:19+00:00Added an answer on May 30, 2026 at 11:43 pm

    Here is a PHP code snippet demonstrating how to serve an image from a PostgreSQL large object to an HTTP connection:

      $db=pg_connect("dbname=mydb host=dbserver");
      pg_query("BEGIN");
      $p = pg_query("SELECT object_id, image_type FROM contents WHERE id=$some_id");
      list($oid,$type) = pg_fetch_row($p);
      $h=pg_lo_open($db, $oid, "r");
      if ($h) {
        header("Content-Type: $type");
        pg_lo_read_all($h);
        pg_lo_close($h);
      }
      pg_query("END");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got two PostgreSQL databases that have been created using the same sql file.
I have a client that has a PostgreSQL database and he cannot remember the
I have a query that works on Postgresql 7.4 but not on Postgresql 8.3
I have a spring application that uses several services such as MySQL, PostgreSQL, and
In PostgreSQL: I have a Table that has 3 columns: CustomerNum, OrderNum, OrderDate .
I have a PostgreSQL database at work that is a single table of data.
I have a postgresql database that has this column structure: Author id name Book
I have a data file in CSV format that has the some data like
I have a postgres table that has the following fields start_date,duration duration contains any
I have a Django-based webapp that is using PostgreSQL as the backend via psycopg2.

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.