Re: storing files in postgres

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: storing files in postgres
Дата
Msg-id 1112291047.30190.4.camel@jd2.commandprompt.com
обсуждение исходный текст
Ответ на storing files in postgres  ("Bob Powell" <bob@hotchkiss.org>)
Список pgsql-general
On Thu, 2005-03-31 at 12:03 -0500, Bob Powell wrote:
> -->
> Hello everyone,
>
> I have created a table as follows:
>
> CREATE TABLE document (
> image_id int,
> image bytea
> );
>
> I want to insert a complete file, let's say an open office document
> into this table.  Anyone know how I would doe this?

You need to use the bytea functions allocated to your language API.
Which language are you using for this?


>
> Then if I can get the document into the image field, how would I
> retrieve it to display it in my HTML document?

When you say "display" what do you mean? An open office sxw document
is not going to display in an html document. You can link to it or
have it stream to launch an external application though.

Sincerely,

Joshua D. Drake




>
> Thanks in advance.
>
> Bob Powell
> Database Administrator
>
--
Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564
Custom programming, 24x7 support, managed services, and hosting
Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG
Reliable replication, Mammoth Replicator - http://www.commandprompt.com/


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

Предыдущее
От: "Joseph M. Day"
Дата:
Сообщение: Re: Temporary Tables
Следующее
От: "Julian Scarfe"
Дата:
Сообщение: Re: truncate/create slowness