pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Sawtell <csawtell@paradise.net.nz>
To: pgsql-sql@postgresql.org
Subject: How to use BYTEA type?
Date: Thu, 1 Nov 2001 21:40:27 +1300
Message-ID: <20011101084028.47F4CD21EF@deborah.paradise.net.nz> (raw)

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.



view thread (4+ messages)  latest in thread

Message-ID: <20011101084028.47F4CD21EF@deborah.paradise.net.nz>
Permalink:  ../20011101084028.47F4CD21EF@deborah.paradise.net.nz/
Also on:    postgresql.org/message-id/20011101084028.47F4CD21EF@deborah.paradise.net.nz

 · 

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: csawtell@paradise.net.nz
  Subject: Re: How to use BYTEA type?
  In-Reply-To: <20011101084028.47F4CD21EF@deborah.paradise.net.nz>

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

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