From 2e6dc5328ca2abb01b87e4e60aa325024c1d45c1 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 5 Aug 2010 18:36:33 +0000 Subject: [PATCH] Document which Python environment variables affect PL/Python --- doc/src/sgml/plpython.sgml | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index c76012db40..988234ce8a 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -1,4 +1,4 @@ - + PL/Python - Python Procedural Language @@ -958,4 +958,64 @@ $$ LANGUAGE plpythonu; + + Environment Variables + + + Some of the environment variables that are accepted by the Python + interpreter can also be used to affect PL/Python behavior. They + would need to be set in the environment of the main PostgreSQL + server process, for example in a start script. The available + environment variables depend on the version of Python; see the + Python documentation for details. At the time of this writing, the + following environment variables have an affect on PL/Python, + assuming an adequate Python version: + + + PYTHONHOME + + + + PYTHONPATH + + + + PYTHONY2K + + + + PYTHONOPTIMIZE + + + + PYTHONDEBUG + + + + PYTHONVERBOSE + + + + PYTHONCASEOK + + + + PYTHONDONTWRITEBYTECODE + + + + PYTHONIOENCODING + + + + PYTHONUSERBASE + + + + (It appears to be a Python implementation detail beyond the control + of PL/Python that some of the environment variables listed on + the python man page are only effective in a + command-line interpreter and not an embedded Python interpreter.) + + -- 2.40.0