Skip site navigation (1) Skip section navigation (2)

Re: A Question about Large Object

From: Rudolf ter Haar <terhaar(at)dutw38(dot)wbmt(dot)tudelft(dot)nl>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: A Question about Large Object
Date: 1999-11-23 12:32:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Hi Juan,

I have nearly the same problem as you seem to have.
I am able to store and retrieve files in a PostgreSQL database.
However i only can save and get files wich are on the Linux box where my
postgres server is running.
Is this the case with your problem too ??

Anyway if i tell my visual basic application that it has to store and
retrieve files on the PC (running windows) than i don't have success.
Saving files at the Linux box is no problem.

I do it the following way

This is the SQL statement in the ODBC string.  (exporting data on the linux

   SELECT lo_export(,'/tmp/photo')  FROM juancol juancol  WHERE

(importing data from the linux machine)

INSERT INTO juancol (,  VALUES ('nicephoto',

I think it is a good idea to work with a unique key to get the photo and to
store the photo, so that we do not get misunderstandings.

Do not forget to think of setting open the directory for writing, with chmod
xxx or something.
I hope this will work for you .

Anyway my problem is that i can not write or read to a PC directly..
Did you solve this with psql ???

Kind regards

Rudolf ter Haar.

Juan Colmenares wrote:

> Hello.
> I'm trying to store a jpeg file into a table created as follow:
> CREATE TABLE juancol (
> name            text,
> photo           oid
> );
> I can insert a jpeg file from pgsql (locally) but I can not do this from
> an
> application written in Visual Basic using an ODBC driver (V06-40-0006).
> I read psqlodbc FAQs (Can I use large objects or OLE?) but I wouldn't
> have to deal with clean-up tasks.
> Someone could tell me any suggestion?
> Thanks in advance!
> Juan Andres.

In response to

pgsql-interfaces by date

Next:From: Hiroshi InoueDate: 1999-11-23 13:17:40
Subject: Re: [INTERFACES] table very big !!!!!
Previous:From: Rafal Piotrowski (CSCS)Date: 1999-11-23 11:19:51
Subject: LargeObject.write(byte[] buf) method

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group