Re: PATH for your scripts/SQL for psql

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Edwin UY <edwin(dot)uy(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: PATH for your scripts/SQL for psql
Date: 2025-05-20 01:35:36
Message-ID: CAKFQuwa2ELtLb3bWwO_v_rX0tPjkcpg+=1e0Sg3TwQDN3Z5e9A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Monday, May 19, 2025, Edwin UY <edwin(dot)uy(at)gmail(dot)com> wrote:

> Hi,
>
> Is there any settings that you can set for the PATH of your SQL/scripts so
> you don't have to cd where they are or specify the full path?
> Kinda like the *nix PATH settings where you can PATH to it and you just
> run your command/scripts
> FYI, I am NOT using psql on the database server.
>

Unable to test it right now but in Linux you should be able to add a
shebang line at the top and make the file executable. Then make sure it is
in PATH.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2025-05-20 06:15:05 Re: PATH for your scripts/SQL for psql
Previous Message Edwin UY 2025-05-19 22:49:33 PATH for your scripts/SQL for psql