I am trying to find a list of PostgreSQL trusted procedural languages (PL) as I often need to use a PL in a non-superuser environment.
But I couldn't find a definitive answer. For example, the Postgres documentation here suggest that there is a both a trusted and an untrusted PL for perl, a language that I am not very familiar with. Here, it says the TRUSTED
keyword is something you can specify when creating a PL language, which may be ignored under circumstances.
But I also have the (possibly wrong) impression that certain PL languages are trusted only (e.g. JavaScript PL/V8) or untruested only (Python). Other posts seem to suggest that one can tweak pg to make even python
a trusted language with something like:
UPDATE pg_language SET lanpltrusted = true WHERE lanname = 'plpythonu';
My question is more practical than theoretical. Basically:
Is it generally true that any PL can be both set up to be trusted and untrusted?
If not, what are the specific languages that can be set up to be trusted or are trusted.
(By "trusted", I mean normal users should have effectively the same rights when creating/executing/modifying functions in the PL language. Also, I am using Postgres 9.x)