pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Image insertion by using BLOB
2+ messages / 2 participants
[nested] [flat]

* Image insertion by using BLOB
@ 2001-01-31 11:20  Som <shekhar@easi.soft.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Som @ 2001-01-31 11:20 UTC (permalink / raw)
  To: pgsql-sql

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'));

If possible , how ?


-som















^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Image insertion by using BLOB
@ 2001-02-01 09:09  Peter T Mount <peter@retep.org.uk>
  parent: Som <shekhar@easi.soft.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter T Mount @ 2001-02-01 09:09 UTC (permalink / raw)
  To: shekhar@easi.soft.net, Som <shekhar@easi.soft.net>; +Cc: 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/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-02-01 09:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-31 11:20 Image insertion by using BLOB Som <shekhar@easi.soft.net>
2001-02-01 09:09 ` Peter T Mount <peter@retep.org.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox