Re: Dynamic technical graphics generation inside plperl query? - Mailing list pgsql-general

From David Fetter
Subject Re: Dynamic technical graphics generation inside plperl query?
Date
Msg-id 20060701165306.GB1661@fetter.org
Whole thread Raw
In response to Dynamic technical graphics generation inside plperl query?  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
List pgsql-general
On Sat, Jul 01, 2006 at 12:49:45PM +0200, Philippe Lang wrote:
> Hi,
>
> Is there a way to use a graphics drawing library (like GD for
> example) inside a plperl function, and "stream" the result image
> (bytea column?) without storing anything to the disk or database?
> Has anyone done that before?

Philippe,

To include an external library, you'll need to use PL/PerlU, which
means you'll be creating the fucntion as the database superuser,
although other users can then invoke the function.  Bytea doesn't have
file semantics like seek(), but it can be the output of a function, so
you should be good to go.  I don't know whether the more file-like lo
interface can be used this way, but it's seldom worth the trouble
anyhow.

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

pgsql-general by date:

Previous
From: "Alain Roger"
Date:
Subject: SELECT statement in stored procedure
Next
From: Alan Hodgson
Date:
Subject: Re: SELECT statement in stored procedure