Re: BLOBs etc

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: BLOBs etc
Дата
Msg-id Pine.BSO.4.56.0501062211370.25172@leary.csoft.net
обсуждение исходный текст
Ответ на Re: BLOBs etc  (Sven Köhler <skoehler@upb.de>)
Ответы Re: BLOBs etc
Список pgsql-jdbc

On Fri, 7 Jan 2005, [ISO-8859-15] Sven K�hler wrote:

> >>on the jdbc-webpages it says, that the JDBC team may decide to change
> >>getBLOBG/setBLOB to support bytea only, and that one should use the
> >>PostGreSQL specific LargeObject extension to acces them.
> >
> > I'm not sure where it says that, but it is either out of date or just
> > plain bad advice.  If you could point out where it says that I'd
> > appreciate it.  I would stick withe the standard Blob interface for now.
>
> http://www.postgresql.org/docs/7.4/static/jdbc-binary-data.html

The 7.4 docs do not really get updated any more, but I will make a change
to this in the 8.0 docs.  Thanks.

> BTW: why don't getInputStream/getBLOB/... work for _both_, bytea and
> oid? Shouldn't the JDBC driver be abled to determine the used datatype
> and act accordingly? I'm sure you had you reasons. I'd just like to know
> them.
>

It certainly could do that.  I'm guessing that it wasn't done to
maintain symmetry with the set methods, knowing that only one can
work.  Making getInputStream work on oid would be easy, but making
getBlob work on bytea would be more work to write a wrapper.  There is
also no real reason to use getBlob on bytea because no streaming is
supported.

Do you think the increased flexiblity is worth the potential for
confusion when the corresponding set method doesn't work?

Kris Jurka

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Sven Köhler
Дата:
Сообщение: Re: BLOBs etc
Следующее
От: Sven Köhler
Дата:
Сообщение: Re: BLOBs etc