Re: What about CREATE OR REPLACE FUNCTION? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: What about CREATE OR REPLACE FUNCTION?
Date
Msg-id 4022.1002648461@sss.pgh.pa.us
Whole thread Raw
In response to Re: What about CREATE OR REPLACE FUNCTION?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: What about CREATE OR REPLACE FUNCTION?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Jean-Michel POURE writes:
>> It is sometimes tricky for Windows users to install a language remotely on
>> a Linux box (no access to createlang and/or no knowledge of handlers).

> Why not run createlang on the host that the server runs on?

I wasn't able to get excited about that argument either.

I believe the primary reason why PL languages aren't installed by
default is security considerations: users can easily create denial-of-
service conditions if given access to a PL.  (Example: write infinitely
recursive function, invoke it to cause stack overflow crash in your
backend, which forces database-wide restart, thereby negating other
people's transactions.  Repeat until DBA kicks you off...)

A DBA who does want to give access to PL languages by default can
easily do so by installing them into template1, whence they'll be
automatically duplicated into newly created databases.  Perhaps this
option needs to be documented more prominently.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: What about CREATE OR REPLACE FUNCTION?
Next
From: Oleg Bartunov
Date:
Subject: Re: Problem with cyrilic