Received: from deborah.paradise.net.nz (deborah.paradise.net.nz [203.96.152.32]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA18eVP97388 for ; Thu, 1 Nov 2001 03:40:33 -0500 (EST) (envelope-from csawtell@paradise.net.nz) Received: from there (202-0-37-152.cable.paradise.net.nz [202.0.37.152]) by deborah.paradise.net.nz (Postfix) with SMTP id 47F4CD21EF for ; Thu, 1 Nov 2001 21:40:28 +1300 (NZDT) Content-Type: text/plain; charset="iso-8859-1" From: Christopher Sawtell Reply-To: csawtell@paradise.net.nz To: pgsql-sql@postgresql.org Subject: How to use BYTEA type? Date: Thu, 1 Nov 2001 21:40:27 +1300 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011101084028.47F4CD21EF@deborah.paradise.net.nz> X-Archive-Number: 200111/1 X-Sequence-Number: 5387 Greetings folks, Please could a kind soul tell be how to extract data from a BYTEA type of field into a file, or better still tell me where I can find some doco? This is the table:- create table fax_info ( id serial, comment text, image bytea) ; This appears to work ( no erorr messages ):- chris=# insert into fax_info ( comment, image ) values ( 'Faking it with a computer', byteain ('picture.pgm.gz')); INSERT 18772 1 Is this correct? Now, how do I get my picture out again? TNX 10^6 Sincerely etc. Christopher Sawtell.