Re: [GENERAL] psql doesn't pass on exported shell environmentfunctions - Mailing list pgsql-general

From Albe Laurenz
Subject Re: [GENERAL] psql doesn't pass on exported shell environmentfunctions
Date
Msg-id A737B7A37273E048B164557ADEF4A58B53A80207@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: [GENERAL] psql doesn't pass on exported shell environment functions  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [GENERAL] psql doesn't pass on exported shell environment functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [GENERAL] psql doesn't pass on exported shell environment functions  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
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 executed within the
> psql script does not define testfunction itself.
> 
> -> == execute in subshell
> 
> ​main-script (def func) -> psql -> psql-call-bash (invoke func)

I am confused; my shell script does *not* contain a function definition.

I copied and pasted a shell session:

First, show the script that contains a function invocation.
Then, define and export the function.
Then, call psql
Then, escape to a subshell.
Then, call the script that successfully calls the function.

Am I missing something?

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Postgresql - commercial version
Next
From: John McKown
Date:
Subject: Re: [GENERAL] Postgresql - commercial version