pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedphotos and OID's
2+ messages / 2 participants
[nested] [flat]
* photos and OID's
@ 2001-05-24 18:45 Mark <mark@zserve.com>
0 siblings, 1 reply; 2+ messages in thread
From: Mark @ 2001-05-24 18:45 UTC (permalink / raw)
To: pgsql-sql
Hi all,
Thanks for the great product.
We store photos in the db and serve them up from web servers. We're
using java servlets on separate web server boxes that are load balanced.
NFS is not an option for us (unless nothing else is available). This
works with byte streams using SQL Server from MS. But, we don't want to
use SQL Server any more, we want to use PostgreSQL.
We need to get the photo data from the db without any file system
access. In other words, we need the bytes, not the OID.
So I read docs and found lo_import/lo_export. But that would only work
for us over NFS and would cause major complications. lo_export won't
cut it for us unless we make some major changes. Can I use the standard
JDBC Blob type to retrieve the photos? What other options do I have?
Thanks,
Mark
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: photos and OID's
@ 2001-05-24 23:28 Richard Huxton <dev@archonet.com>
parent: Mark <mark@zserve.com>
0 siblings, 0 replies; 2+ messages in thread
From: Richard Huxton @ 2001-05-24 23:28 UTC (permalink / raw)
To: Mark <mark@zserve.com>; pgsql-sql
From: "Mark" <mark@zserve.com>
> We store photos in the db and serve them up from web servers. We're
> using java servlets on separate web server boxes that are load balanced.
> NFS is not an option for us (unless nothing else is available). This
> works with byte streams using SQL Server from MS. But, we don't want to
> use SQL Server any more, we want to use PostgreSQL.
>
> We need to get the photo data from the db without any file system
> access. In other words, we need the bytes, not the OID.
>
> So I read docs and found lo_import/lo_export. But that would only work
> for us over NFS and would cause major complications. lo_export won't
> cut it for us unless we make some major changes. Can I use the standard
> JDBC Blob type to retrieve the photos? What other options do I have?
I'm no expert on Java, but it looks like the JDBC interface (ch 8.5) takes
InputStream and OutputStream as parameters for lo_import/lo_export. Can you
not then tie them to whatever image class you use?
File access is needed at the database end (it stores the lo's in separate
files) but not on your client webservers.
Hopefully that's what you're after, but you might want to wait around for a
second opinion.
- Richard Huxton
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-05-24 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-24 18:45 photos and OID's Mark <mark@zserve.com>
2001-05-24 23:28 ` Richard Huxton <dev@archonet.com>
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