Re: Retrieve filename within a script

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Retrieve filename within a script
Date: 2024-11-15 15:48:10
Message-ID: a227bc4f-cfc0-4b65-8c40-4cc03092e1bb@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/14/24 00:42, Patrick FICHE wrote:
> Hi,
>
> I was wondering if it was possible to get the filename provided as an
> argument to psql.

Not that I know of.

>
> psql -f /tmp/test.sql
>
> I would like a command in test.sql that would be able to retrieve the
> full pathname (/tmp/test.sql).
>
> Regards,
>
> Patrick
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Förtsch 2024-11-15 15:49:38 Re: DB Files
Previous Message Adrian Klaver 2024-11-15 15:47:41 Re: DB Files