From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql doesn't pass on exported shell environment functions |
Date: | 2017-07-07 13:55:40 |
Message-ID: | CAKFQuwZ6FYi8Z+MjJeD3EhHzM7tbD2w9o_Pd4nM59XN5ptmktw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jul 7, 2017 at 3:59 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
wrote:
> David G. Johnston wrote:
> > In hindsight I'm not surprised but couldn't find a ready explanation on
> the web and
> > figured I'd inquire here. In short: "export VAR" and "export -f
> functionname" behave
> > differently when psql is acting as a relay.
>
> It works for me on Linux with 9.6.3 psql:
>
>
Except you haven't recreated the scenario I presented.
You only are involving a single script and that script defines
"testfunction" itself (which makes exporting pointless). In my example the
script being executed within the psql script does not define testfunction
itself.
-> == execute in subshell
main-script (def func) -> psql -> psql-call-bash (invoke func)
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2017-07-07 13:58:06 | Re: Postgresql - commercial version |
Previous Message | Krithika Venkatesh | 2017-07-07 13:52:24 | Postgresql - commercial version |