Simplfied Bytea input/output? - Mailing list pgsql-general

From Jerry LeVan
Subject Simplfied Bytea input/output?
Date
Msg-id A16B3084-E627-11D8-BFBD-000393779D9C@eku.edu
Whole thread Raw
Responses Re: Simplfied Bytea input/output?  (Kris Jurka <books@ejurka.com>)
List pgsql-general
Hi,
I am adding image and large object support in my Cocoa
postgresql browser.

Are there going to be any enhanced bytea support functions
coming along?

It seems sorta silly to have to write customized C code
to import a file into a bytea field.

Maybe something like

CREATE TABLE image (
     name            text,
     raster          bytea
);

INSERT INTO image (name, raster)
     VALUES ('beautiful image', bytea_import('/etc/motd'));

SELECT bytea_export(image.raster, '/tmp/motd') FROM image
     WHERE name = 'beautiful image';

Jerry


pgsql-general by date:

Previous
From: Dave Cramer
Date:
Subject: Re: trash talk
Next
From: Robert Treat
Date:
Subject: Re: Where are all the users?