Re: Problem setting environmental variables for postgresql or plpythonu

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Mark Wynter *EXTERN*" <mark(at)dimensionaledge(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem setting environmental variables for postgresql or plpythonu
Date: 2012-07-20 07:44:18
Message-ID: D960CB61B694CF459DCFB4B0128514C2082E6FD4@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Wynter wrote:
> I''m hoping someone can help me out. I'm wanting to run GRASS GIS
from within a plpythonu function
> block. But to run GRASS GIS externally, the following environmental
variables need to be available to
> the Postgresql server...

[...]

> 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...

What if you set the environment variables in the Python function?
I don't speak Python, but I guess you can set environment
variables in this language.

Other than that, it would be interesting to know which
operating system you are using and how you start the server.

On Linux for example, it works quite fine to export a
variable and then start the server with "pg_ctl start".

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message AI Rumman 2012-07-20 10:30:41 I cannot insert bengali character in UTF8
Previous Message Martin French 2012-07-20 06:59:02 Re: How to stop a query