Received: from sultan.intranet.org (root@ppp-151.net10.magic.fr [195.154.128.151]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA45123 for ; Mon, 24 Jan 2000 11:10:27 -0500 (EST) (envelope-from advl@advl.org) Received: from localhost (localhost [[UNIX: localhost]]) by sultan.intranet.org (8.9.3/8.9.3) id RAA01967 for pgsql-sql@postgreSQL.org; Mon, 24 Jan 2000 17:17:11 +0100 From: Compte utilisateur Sultan-advl Reply-To: webmaster@advl.org Organization: ADVL To: pgsql-sql@postgreSQL.org Subject: Fwd: Re: [SQL] Blobs Date: Mon, 24 Jan 2000 17:16:07 +0100 X-Mailer: KMail [version 1.0.21] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00012417171000.01945@sultan> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id LAA45163 ---------- Message réacheminé ---------- Subject: Re: [SQL] Blobs Date: Mon, 24 Jan 2000 17:07:05 +0100 From: Compte utilisateur Sultan-advl 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: ---------------------------------------