From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Edwin UY <edwin(dot)uy(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PATH for your scripts/SQL for psql |
Date: | 2025-05-20 06:15:05 |
Message-ID: | 2bb15798dd91b4ae09e578d360aa5cb57cc47173.camel@cybertec.at |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
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
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2025-05-20 11:18:41 | Re: PATH for your scripts/SQL for psql |
Previous Message | David G. Johnston | 2025-05-20 01:35:36 | Re: PATH for your scripts/SQL for psql |