Received: from www.aldratech.com ([213.157.162.9]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA1AGDP60972 for ; Thu, 1 Nov 2001 05:16:13 -0500 (EST) (envelope-from radu.popescu@www.aldratech.com) Message-ID: <3BE120D1.3060406@www.aldratech.com> Date: Thu, 01 Nov 2001 12:15:45 +0200 From: Radu-Adrian Popescu User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: csawtell@paradise.net.nz CC: pgsql-sql@postgresql.org Subject: Re: How to use BYTEA type? References: <20011101084028.47F4CD21EF@deborah.paradise.net.nz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Received: from 192.168.0.6 ([192.168.0.6]) by www.aldratech.com (JAMES SMTP Server 1.2.1rc2) with SMTP ID 234; Thu, 1 Nov 2001 13:19:46 +0200 X-Archive-Number: 200111/2 X-Sequence-Number: 5388 Doing template1=> SELECT proname from pg_proc ; proname ------------------------ boolin boolout byteain byteaout you can see there is a byteaout function also. However, these are undocumented in the interactive docs, which is a shame indeed. I only learned of byteain/out after reading your email. If some of the postgresql guys could point the location of the documentation of undocumented functions :-) that'd be great. Radu-Adrian Popescu DBA/programmer at www.aldratech.com Christopher Sawtell wrote: >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. > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >