Search Postgresql Archives

Re: Retrieve filename within a script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Nov 2024 08:42:36 +0000
Patrick FICHE <Patrick.Fiche@xxxxxxxxxxx> wrote:

> I was wondering if it was possible to get the filename provided as an argument to psql.
> psql -f /tmp/test.sql
> 

Since you know it already, you could pass it as a variable :

psql -f /tmp/test.sql -v my_path='/tmp/test.sql'

and retrieve it with SELECT :'my_path';

-- 
					Bien à vous, Vincent Veyron

https://marica.fr
Logiciel de gestion des contentieux juridiques, des contrats et des sinistres d'assurance






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux