public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Edwin UY <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: PATH for your scripts/SQL for psql
Date: Tue, 20 May 2025 08:15:05 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+wokJ9EpO0FXxpVTcgsuuL0SehdFwEdJz3ZBKJKbMJtskhfuA@mail.gmail.com>
References: <CA+wokJ9EpO0FXxpVTcgsuuL0SehdFwEdJz3ZBKJKbMJtskhfuA@mail.gmail.com>
On Tue, 2025-05-20 at 10:49 +1200, Edwin UY wrote:
> 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.
No.
All you can do is use \cd:
psql -c '\cd /some/where' -c '\i script.sql'
which is more complicated than specifying the full path, except if
you want to run several scripts with a single "psql" command.
Yours,
Laurenz Albe
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: PATH for your scripts/SQL for psql
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox