Re: Dynamic technical graphics generation inside plperl query?

From: David Fetter <david(at)fetter(dot)org>
To: Philippe Lang <philippe(dot)lang(at)attiksystem(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dynamic technical graphics generation inside plperl query?
Date: 2006-07-01 16:53:06
Message-ID: 20060701165306.GB1661@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2006-07-01 17:56:26 Re: SELECT statement in stored procedure
Previous Message Alain Roger 2006-07-01 16:08:19 SELECT statement in stored procedure