Re: BUG #14645: Can't use psql from within program used by "copy ... from program" script?

From: John Norman <john(at)7fff(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14645: Can't use psql from within program used by "copy ... from program" script?
Date: 2017-05-06 18:44:55
Message-ID: CAGcH5RFsnTuEZ5og4TMkdVZe0-wrPA38AVubWGt8ecHHJ0Cgag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom,

PATH issue!

I changed the inner script to source my $HOME/.bash_profile -- all good.

THANKS! I apologize for not checking the obvious.

And also in the category of the obvious: I double-checked the PG log, and
now see line 5: psql: command not found

My bad. Sorry to use up your time.

On Sat, May 6, 2017 at 1:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> John Norman <john(at)7fff(dot)com> writes:
> > I'm running this all locally on my laptop.
> > I checkout stdout and stderr: Nothing.
>
> Hmph ... how are you starting the server exactly?
>
> I now notice that you're running on OS X ... what version of that?
> Do you have SIP enabled? SIP has been known to break stuff like
> this; in particular I'm thinking of its habit of silently suppressing
> key environment variables like DYLD_LIBRARY_PATH at inopportune times.
> If your setup is such that your psql needs that set to start correctly,
> that could be a place to look for an explanation.
>
> A related thought is that maybe PATH in the server is different from
> what you have interactively, so that it's not finding psql, or finding
> the wrong copy. Specifying a full path to psql in the invoked script
> would help narrow that down.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-05-06 18:49:00 Re: BUG #14645: Can't use psql from within program used by "copy ... from program" script?
Previous Message Tom Lane 2017-05-06 18:28:04 Re: BUG #14645: Can't use psql from within program used by "copy ... from program" script?