Re: Simplfied Bytea input/output?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Jerry LeVan <jerry(dot)levan(at)eku(dot)edu>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Simplfied Bytea input/output?
Date: 2004-08-04 19:40:01
Message-ID: Pine.BSO.4.56.0408041436510.7043@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 4 Aug 2004, Jerry LeVan wrote:

> 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';
>

Doing this kind of file/read write is only useful if the client and server
are on the same machine which is a kind of limiting restriction if you are
trying to make a generic data browsing tool. Further any function that
does file access like this must run with superuser permissions to prevent
misuse which is another serious restriction.

Kris Jurka

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Sarsale 2004-08-04 20:06:11 query result set caching
Previous Message David Rysdam 2004-08-04 18:49:03 Re: COPY not handling BLOBs