How to use BYTEA type?

From: Christopher Sawtell <csawtell(at)paradise(dot)net(dot)nz>
To: pgsql-sql(at)postgresql(dot)org
Subject: How to use BYTEA type?
Date: 2001-11-01 08:40:27
Message-ID: 20011101084028.47F4CD21EF@deborah.paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Md Aminur Rashid 2001-11-01 09:56:59 problem in group by
Previous Message Aasmund Midttun Godal 2001-11-01 03:26:07 Re: transposing data for a view