pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
jdbc large object support ??
9+ messages / 4 participants
[nested] [flat]

* jdbc large object support ??
@ 2000-07-19 20:06  John Thorhauer <jthorhauer@phoenixcolor.com>
  0 siblings, 1 reply; 9+ messages in thread

From: John Thorhauer @ 2000-07-19 20:06 UTC (permalink / raw)
  To: pgsql-interfaces

I read on the jdbc driver web page that "Stream support for large
objects is delayed until 7.1".  But I also see an example called
ImageViewer.java in the src distribution of postgres that uses large
objects.  So...... Can I use postgres large objects with the most recent
jdbc driver? Anf if so, what is "Stream support" and do I really need
it?

Thanks,
John
-- 
********************************
** John Thorhauer
** jthorhauer@phoenixcolor.com
********************************



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

* Re: jdbc large object support ??
@ 2000-07-19 20:14  Joachim Achtzehnter <joachim@kraut.bc.ca>
  parent: John Thorhauer <jthorhauer@phoenixcolor.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Joachim Achtzehnter @ 2000-07-19 20:14 UTC (permalink / raw)
  To: pgsql-interfaces

On Wed, 19 Jul 2000, John Thorhauer wrote:
>
> I read on the jdbc driver web page that "Stream support for large
> objects is delayed until 7.1".  But I also see an example called
> ImageViewer.java in the src distribution of postgres that uses large
> objects.  So...... Can I use postgres large objects with the most recent
> jdbc driver? Anf if so, what is "Stream support" and do I really need
> it?

Take a look at the mailing list archive. This question was discussed in
great detail during the last couple of days. You use setBytes() and
getBytes() instead of streams, for details see the archive.

Joachim




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

* Re: jdbc large object support ??
@ 2000-07-19 20:41  John Thorhauer <jthorhauer@phoenixcolor.com>
  parent: Joachim Achtzehnter <joachim@kraut.bc.ca>
  0 siblings, 1 reply; 9+ messages in thread

From: John Thorhauer @ 2000-07-19 20:41 UTC (permalink / raw)
  To: pgsql-interfaces

Joachim Achtzehnter wrote:
> 
> Take a look at the mailing list archive. This question was discussed in
> great detail during the last couple of days. You use setBytes() and
> getBytes() instead of streams, for details see the archive.
> 

OK.  I looked at that and I saw someone mention something about using
the text type to store data.  What I am doing is trying to store xml
files in postgres.  So maybe a field of type "text" willl take care of
my needs.  What is the size limit on fields of type text?

Thanks,
John
-- 
********************************
** John Thorhauer
** jthorhauer@phoenixcolor.com
********************************



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

* Re: jdbc large object support ??
@ 2000-07-19 20:57  Joachim Achtzehnter <joachim@kraut.bc.ca>
  parent: John Thorhauer <jthorhauer@phoenixcolor.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Joachim Achtzehnter @ 2000-07-19 20:57 UTC (permalink / raw)
  To: pgsql-interfaces

On Wed, 19 Jul 2000, John Thorhauer wrote:
>
> Joachim Achtzehnter wrote:
> >
> > Take a look at the mailing list archive. This question was discussed in
> > great detail during the last couple of days. You use setBytes() and
> > getBytes() instead of streams, for details see the archive.
> >
>
> OK.  I looked at that and I saw someone mention something about using
> the text type to store data.  What I am doing is trying to store xml
> files in postgres.

Was not referring to the use of the text type, but rather to the lengthy
discussion about how one can use Postgresql large objects via JDBC. Just
read all of yesterday's messages with "setBytes" or "Blob" in the subject
line. This was all about large object (BLOB) support.

Joachim





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

* Re: jdbc large object support ??
@ 2000-07-20 06:20  S.A.Pamungkas <moenk_2000@yahoo.com>
  0 siblings, 1 reply; 9+ messages in thread

From: S.A.Pamungkas @ 2000-07-20 06:20 UTC (permalink / raw)
  To: pgsql-interfaces


--- Joachim Achtzehnter <joachim@kraut.bc.ca> wrote:

> ..... This was all about large object (BLOB)
> support.

Is the Postgresql large object (BLOB) support
including "video file" also ( MPEG, ram etc ) ???

- Pamungkas-

__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/



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

* Re: jdbc large object support ??
@ 2000-07-20 06:27  Joachim Achtzehnter <joachim@kraut.bc.ca>
  parent: S.A.Pamungkas <moenk_2000@yahoo.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Joachim Achtzehnter @ 2000-07-20 06:27 UTC (permalink / raw)
  To: S.A.Pamungkas <moenk_2000@yahoo.com>; +Cc: pgsql-interfaces

Today, in a message to pgsql-interfaces, S.A.Pamungkas wrote:
> 
> Is the Postgresql large object (BLOB) support
> including "video file" also ( MPEG, ram etc ) ???

A BLOB (Binary Large OBject) is a sequence of bytes. Postgresql does not
know or care what these bytes mean. Sure, you can store MPEG files if you
like.

Joachim

-- 
work:     joachima@realtimeint.com (http://www.realtimeint.com)
private:  joachim@kraut.bc.ca      (http://www.kraut.bc.ca)




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

* RE: jdbc large object support ??
@ 2000-07-20 06:36  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 1 reply; 9+ messages in thread

From: Peter Mount @ 2000-07-20 06:36 UTC (permalink / raw)
  To: 'John Thorhauer' <jthorhauer@phoenixcolor.com>; pgsql-interfaces

Large Objects have been supported for years - just not via streams.

Stream support is simply passing an InputStream (say from a file) directly
to a large object in the database. The ImageViewer example shows the other
two ways, using setBytes() and using our own extensions.

Peter

--
Peter Mount
Enterprise Support Mushroom
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council


-----Original Message-----
From: John Thorhauer [mailto:jthorhauer@phoenixcolor.com]
Sent: Wednesday, July 19, 2000 9:07 PM
To: postgres-inter
Subject: [INTERFACES] jdbc large object support ??


I read on the jdbc driver web page that "Stream support for large
objects is delayed until 7.1".  But I also see an example called
ImageViewer.java in the src distribution of postgres that uses large
objects.  So...... Can I use postgres large objects with the most recent
jdbc driver? Anf if so, what is "Stream support" and do I really need
it?

Thanks,
John
-- 
********************************
** John Thorhauer
** jthorhauer@phoenixcolor.com
********************************



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

* Re: jdbc large object support ??
@ 2000-07-20 11:08  John Thorhauer <jthorhauer@phoenixcolor.com>
  parent: Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 9+ messages in thread

From: John Thorhauer @ 2000-07-20 11:08 UTC (permalink / raw)
  To: pgsql-interfaces

Peter Mount wrote:
> 
> Large Objects have been supported for years - just not via streams.
> 
> Stream support is simply passing an InputStream (say from a file) directly
> to a large object in the database. The ImageViewer example shows the other
> two ways, using setBytes() and using our own extensions.

I tried the setBytes method and it worked great!  Thanks for the help.
However, I have another question.  If I understand correctly I can use
the setBytes() method or the getLargeObjectAPI() method.  Is one
preferred over the other?  Does either have any distinct problems that I
should be aware of?

I know these are real general questions but I am trying to make sure
that I start off going in the right direction with this stuff ;-)

Thanks again,
John
-- 
********************************
** John Thorhauer
** jthorhauer@phoenixcolor.com
********************************



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

* RE: jdbc large object support ??
@ 2000-07-20 11:20  Peter Mount <petermount@it.maidstone.gov.uk>
  0 siblings, 0 replies; 9+ messages in thread

From: Peter Mount @ 2000-07-20 11:20 UTC (permalink / raw)
  To: 'John Thorhauer' <jthorhauer@phoenixcolor.com>; pgsql-interfaces

The LargeObject & LargeObjectManager classes implement the actual interface
to the large objects. setBytes() actually uses those classes, so in theory
using the LargeObject classes would be the better.

However, setBytes() is part of the standard JDBC api.

Personally I prefer the extension classes, as you gain random access to the
BLOB.

Peter

--
Peter Mount
Enterprise Support Mushroom
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council


-----Original Message-----
From: John Thorhauer [mailto:jthorhauer@phoenixcolor.com]
Sent: Thursday, July 20, 2000 12:08 PM
To: postgres-inter
Subject: Re: [INTERFACES] jdbc large object support ??


Peter Mount wrote:
> 
> Large Objects have been supported for years - just not via streams.
> 
> Stream support is simply passing an InputStream (say from a file) directly
> to a large object in the database. The ImageViewer example shows the other
> two ways, using setBytes() and using our own extensions.

I tried the setBytes method and it worked great!  Thanks for the help.
However, I have another question.  If I understand correctly I can use
the setBytes() method or the getLargeObjectAPI() method.  Is one
preferred over the other?  Does either have any distinct problems that I
should be aware of?

I know these are real general questions but I am trying to make sure
that I start off going in the right direction with this stuff ;-)

Thanks again,
John
-- 
********************************
** John Thorhauer
** jthorhauer@phoenixcolor.com
********************************



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


end of thread, other threads:[~2000-07-20 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-19 20:06 jdbc large object support ?? John Thorhauer <jthorhauer@phoenixcolor.com>
2000-07-19 20:14 ` Joachim Achtzehnter <joachim@kraut.bc.ca>
2000-07-19 20:41   ` John Thorhauer <jthorhauer@phoenixcolor.com>
2000-07-19 20:57     ` Joachim Achtzehnter <joachim@kraut.bc.ca>
2000-07-20 06:20 Re: jdbc large object support ?? S.A.Pamungkas <moenk_2000@yahoo.com>
2000-07-20 06:27 ` Joachim Achtzehnter <joachim@kraut.bc.ca>
2000-07-20 06:36 RE: jdbc large object support ?? Peter Mount <petermount@it.maidstone.gov.uk>
2000-07-20 11:08 ` John Thorhauer <jthorhauer@phoenixcolor.com>
2000-07-20 11:20 RE: jdbc large object support ?? Peter Mount <petermount@it.maidstone.gov.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