Re: Question about stored procedures - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Question about stored procedures
Date
Msg-id 20051013170515.GJ16317@phlogiston.dyndns.org
Whole thread Raw
In response to Re: Question about stored procedures  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
List pgsql-general
On Thu, Oct 13, 2005 at 03:00:32PM +0200, Stephane Bortzmeyer wrote:
> Note that a common trick, when you want to do X and you cannot do it
> directly from PostgreSQL (or are unwilling to force the sysadmin to
> install stuff like plWhatever - for instance, I was never able to make
> plPython run on my NetBSD machines), is to put data in a table and to
> have an auxiliary daemon which connects to the database and read in
> the table what it must do.

From the point of view of security, that's also a good idea.  If you
have a bug in your trusted function, and it can write on the
filesystem, and somebody can manage to get their string to be passed
into your function, then they maybe can inject things like "rm -r
$PGDATA".  Which would hurt.

That isn't to say, "Never do this."  It's just to say that you have a
real dangerous tool there in your hand, so don't be waving it about
carelessly.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
It is above all style through which power defers to reason.
        --J. Robert Oppenheimer

pgsql-general by date:

Previous
From: Alex Turner
Date:
Subject: Re: PostgreSQL 8.1 vs. MySQL 5.0?
Next
From: Andrew Sullivan
Date:
Subject: Re: Cluster/redundancy question