Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread David G. Johnston
On Fri, Jul 7, 2017 at 8:45 AM, Tom Lane wrote: > "David G. Johnston" writes: > > ​I'm using Ubuntu 16.04 > > Hmph. Works for me on RHEL6. I'm betting that Ubuntu has put in some > weird security restriction, possibly an overreaction to the

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread Tom Lane
"David G. Johnston" writes: > ​I'm using Ubuntu 16.04 Hmph. Works for me on RHEL6. I'm betting that Ubuntu has put in some weird security restriction, possibly an overreaction to the "shellshock" bug which was in the exported-functions feature.

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread David G. Johnston
On Fri, Jul 7, 2017 at 8:19 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Jul 7, 2017 at 8:12 AM, David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> ​I'm using Ubuntu 16.04 >> >> > ​Seems to be a regression since this works on my 14.04 setup. > > ​Sorry for the

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread David G. Johnston
On Fri, Jul 7, 2017 at 8:12 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​I'm using Ubuntu 16.04 > > ​Seems to be a regression since this works on my 14.04 setup. David J. ​

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread David G. Johnston
On Fri, Jul 7, 2017 at 7:43 AM, Albe Laurenz wrote: > David G. Johnston wrote: > >> 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 >

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread Tom Lane
Albe Laurenz writes: > David G. Johnston wrote: >> ​Except you haven't recreated the scenario I presented.​ > Am I missing something? I wonder what platform David is using. This looks suspiciously like a feature that macOS' SIP would be designed to break. It would be

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread Albe Laurenz
David G. Johnston wrote: >> 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

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread David G. Johnston
​On Fri, Jul 7, 2017 at 3:59 AM, Albe Laurenz 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 > >

Re: [GENERAL] psql doesn't pass on exported shell environment functions

2017-07-07 Thread Albe Laurenz
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:

[GENERAL] psql doesn't pass on exported shell environment functions

2017-07-06 Thread David G. Johnston
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. //main-script #!/usr/bin/env bash function testfunction() { echo "Function