Problem setting environmental variables for postgresql or plpythonu - Mailing list pgsql-general

From Mark Wynter
Subject Problem setting environmental variables for postgresql or plpythonu
Date
Msg-id A02063CD-841A-4CD4-8C9D-2C3DF0ED2CE6@dimensionaledge.com
Whole thread Raw
Responses Re: Problem setting environmental variables for postgresql or plpythonu  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general
I''m hoping someone can help me out.   I'm wanting to run GRASS GIS from within a plpythonu function block.  But to run
GRASSGIS externally, the following environmental variables need to be available to the Postgresql server... 

GISBASE='/usr/local/grass-6.4.3svn'
PATH='$PATH:$GISBASE/bin:$GISBASE/scripts:$GISBASE/lib'
PYTHONPATH='${PYTHONPATH}:$GISBASE/etc/python/'
PYTHONPATH='${PYTHONPATH}:$GISBASE/etc/python/grass'
PYTHONPATH='${PYTHONPATH}:$GISBASE/etc/python/grass/script'
LD_LIBRARY_PATH='$LD_LIBRARY_PATH:$GISBASE/lib'
GIS_LOCK='$$'
GISRC='$HOME/.grassrc6'

Reference:  http://grass.osgeo.org/wiki/GRASS_and_Python

So far I've added these variables to /etc/bash.bashrc
which makes them available to the postgres user (but not the server or pl/python).

And I've had no success adding them to...
/etc/postgresql/9.1/main/environment
#Shell commands are not evaluated.

Any suggestions would be appreciated...

Thanks
Mark

pgsql-general by date:

Previous
From: Adam Crews
Date:
Subject: postgres 9 bind address for replication
Next
From: Nick
Date:
Subject: Re: High CPU on read-only streaming replication server