Re: Image insertion by using BLOB - Mailing list pgsql-sql

From Peter T Mount
Subject Re: Image insertion by using BLOB
Date
Msg-id 981018545.3a7927b14ddcf@webmail.retep.org.uk
Whole thread Raw
In response to Image insertion by using BLOB  (Som <shekhar@easi.soft.net>)
List pgsql-sql
Quoting Som <shekhar@easi.soft.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@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/


pgsql-sql by date:

Previous
From: Padmajha Raghunathan
Date:
Subject: usage of lo_import
Next
From: "Albert REINER"
Date:
Subject: PL/pgSQL: possible parsing or documentation bug?