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 7502389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:51:10+00:00 2026-05-29T20:51:10+00:00

I have a PostgreSQL 9.1 database in which pictures are stored as large objects.

  • 0

I have a PostgreSQL 9.1 database in which pictures are stored as large objects.
Is there a way to export the files to the clients filesystem through an SQL query?

select lo_export(data,'c:\img\test.jpg') from images where id=0;

I am looking for a way similar to the line above, but with the client as target.
Thanks in advance!

  • 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-29T20:51:12+00:00Added an answer on May 29, 2026 at 8:51 pm

    this answer is very late but will be helpful so some one i am sure

    To get the images from the server to the client system you can use this

    "C:\Program Files\PostgreSQL\9.0\bin\psql.exe" -h 192.168.1.101 -p 5432 -d mDB -U mYadmin -c  "\lo_export 19135 'C://leeImage.jpeg' ";
    

    Where

    1. h 192.168.1.101 : is the server system IP
    2. -d mDB : the database name
    3. -U mYadmin : user name
    4. \lo_export : the export function that will create the image at the client system location
    5. C://leeImage.jpeg : The location and the name of the target image from the OID of the image
    6. 19135 : this is the OID of the image in you table.

    the documentation is here commandprompt.com

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

Sidebar

Related Questions

I have a Postgresql database on which I want to do a few cascading
Right now I have a database (about 2-3 GB) in PostgreSQL, which serves as
I have a column in the PostgreSQL database which contains Arabic data. When reading
I have a Spring application which uses Hibernate on a PostgreSQL database. I'm trying
I have a PostgreSQL\PostGIS spatial database which contains Hebrew text columns. The system runs
I'm about to start a new project which should have a rather large database.
I have a ASP.NET MVC 3 application using NHibernate over a PostgreSQL database. There
I have a PostgreSQL (9.0) database with a column card_id which is currently of
I have a postgresql database which look like the following : +---------------+---------------- ------+------------ ---+
I have a backend process that maintains state in a PostgreSQL database, which needs

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.