Re: Selecting Large Object and TOAST

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Selecting Large Object and TOAST
Дата
Msg-id 4393B9E6.5070500@Yahoo.com
обсуждение исходный текст
Ответ на Re: Selecting Large Object and TOAST  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: Selecting Large Object and TOAST  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
On 12/4/2005 9:24 PM, Joshua D. Drake wrote:

>>>
>>> (1) what would be the return type if i want to return a large object (
>>> XYZ.gif) to the remote client (GUI) using stored procedure.
>>> Can anyone give an example please?
>>> Are there any size limitations i need to consider when returning Large
>>> Object using procedures?
> You have to use a lookup table that correlates the meta information
> (filename, content-type)
> with a particular loid. That way you can store any binary you want.

This doesn't answer the question.

Fact is that most procedural languages (including PL/pgSQL) don't have
any access to classic large objects in the first place. So all the
stored procedure can do is to return the identifier of the large object
to the client and the client must then use lo_open(), lo_read() etc. to
actually get the data of the object. Not all client interfaces support
these fastpath based libpq functions.

>
>>>
>>> How do i TOAST my data stored as Large Object?
> This isn't a concern as it is all internal and automatic.
>
>> You don't. You would change you schema and application to store the
>> images in bytea columns instead.
>>
> Well I have to disagree with this. It entirely depends on the size of
> the data you are storing. Bytea is remarkably
> innefficient.

Which would be the data type of your choice for images?


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Some rare questions
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Slow COUNT