Retrieve filename within a script

From: Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Retrieve filename within a script
Date: 2024-11-14 08:42:36
Message-ID: DUZPR05MB110211E125949ECF03413C533EF5B2@DUZPR05MB11021.eurprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I was wondering if it was possible to get the filename provided as an argument to psql.
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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johannes Lochmann 2024-11-14 08:58:49 Re: question on audit columns
Previous Message Mark Phillips 2024-11-14 05:05:34 Re: Row level security policy