Re: Image insertion by using BLOB

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: shekhar(at)easi(dot)soft(dot)net, Som <shekhar(at)easi(dot)soft(dot)net>
Cc: Queries <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Image insertion by using BLOB
Date: 2001-02-01 09:09:05
Message-ID: 981018545.3a7927b14ddcf@webmail.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Quoting Som <shekhar(at)easi(dot)soft(dot)net>:

> Hi ALL,
> I am trying to insert the image from the client to database by
> spicifying the Windows NT machine filepath.
> The server(postgresql 7.0) is situated at the linux.
> If filepath is linux m/c's then i can ...
> If filepath is winNT then i have Exception saying :
>
> ERROR: lo_import : ca't open unix file "/jigsaw/jigsaw/www/som.gif "
> No such file or directory
>
> Query is as follows::
> insert into tablename values('som', lo_import('PATH'));

lo_import only works on the servers filesystem.

>
> If possible , how ?

You need to use the fastpath/largeobject api's to send the image over the
network connection.

There's 2 C & 1 Java examples included in the source showing this.

Peter

>
>
> -som
>
>
>
>
>
>
>
>
>
>
>
>
>

--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Najm Hashmi 2001-02-01 15:09:29 Re: Permissions for foreign keys
Previous Message Padmajha Raghunathan 2001-02-01 07:57:52 usage of lo_import