Fwd: Re: [SQL] Blobs

Поиск
Список
Период
Сортировка
От Compte utilisateur Sultan-advl
Тема Fwd: Re: [SQL] Blobs
Дата
Msg-id 00012417171000.01945@sultan
обсуждение исходный текст
Список pgsql-sql

----------  Message r�achemin�  ----------
Subject: Re: [SQL] Blobs
Date: Mon, 24 Jan 2000 17:07:05 +0100
From: Compte utilisateur Sultan-advl <webmaster@advl.org>


You can find this in Postgresql documentation :
PostgreSQL
Prev
Chapter 44. Large Objects
Built in registered functions
There are two built-in registered functions, lo_import and lo_export which are convenient for use in SQL queries.
Here is an example of their use 

CREATE TABLE image (   name            text,   raster          oid
);

INSERT INTO image (name, raster)   VALUES ('beautiful image', lo_import('/etc/motd'));

SELECT lo_export(image.raster, "/tmp/motd") from image   WHERE name = 'beautiful image';

Regards.
Emmanuel.


Le lun, 24 jan 2000, vous avez �crit :
> >%_Hi Folks
> 
> I want to store Word docs etc into the mighty Postgres. I think this means using blobs. 
> 
> 1.Does anybody know the SQL to create say a table with a field called docs to store them in. I don't know what the
datatype is.
 
> 
>     ie something like CREATE TABLE documents docs (blob datatype ??)
> 
> 2. Is there some special syntax to get the blob back. ie SELECT (special syntax)
> 
> Thanks
> 
> Neil@blueice
> 
> 

----------------------------------------
Content-Type: text/html; name="unnamed"
Content-Transfer-Encoding: quoted-printable
Content-Description: 
---------------------------------------


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

Предыдущее
От: Mathijs Brands
Дата:
Сообщение: Re: [SQL] Blobs
Следующее
От: Mark Volpe
Дата:
Сообщение: Backend crash