Simplfied Bytea input/output?

Поиск
Список
Период
Сортировка
От Jerry LeVan
Тема Simplfied Bytea input/output?
Дата
Msg-id A16B3084-E627-11D8-BFBD-000393779D9C@eku.edu
обсуждение исходный текст
Ответы Re: Simplfied Bytea input/output?  (Kris Jurka <books@ejurka.com>)
Список 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 по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: trash talk
Следующее
От: Robert Treat
Дата:
Сообщение: Re: Where are all the users?