agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Compte utilisateur Sultan-advl <webmaster@advl.org>
To: pgsql-sql@postgreSQL.org
Subject: Fwd: Re: [SQL] Blobs
Date: Mon, 24 Jan 2000 17:16:07 +0100
Message-ID: <00012417171000.01945@sultan> (raw)



----------  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 data type 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: 
---------------------------------------



view thread (20+ messages)  latest in thread

Message-ID: <00012417171000.01945@sultan>
Permalink:  ../00012417171000.01945@sultan/
Also on:    postgresql.org/message-id/00012417171000.01945@sultan

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: webmaster@advl.org
  Subject: Re: Fwd: Re: [SQL] Blobs
  In-Reply-To: <00012417171000.01945@sultan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox