Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tByYT-007pEP-GX for pgsql-general@arkaria.postgresql.org; Fri, 15 Nov 2024 15:48:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tByYQ-00AXg5-VB for pgsql-general@arkaria.postgresql.org; Fri, 15 Nov 2024 15:48:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tByYQ-00AXfw-Jw for pgsql-general@lists.postgresql.org; Fri, 15 Nov 2024 15:48:15 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tByYO-0022mZ-Nm for pgsql-general@lists.postgresql.org; Fri, 15 Nov 2024 15:48:13 +0000 Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 8C1A711400AF; Fri, 15 Nov 2024 10:48:11 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Fri, 15 Nov 2024 10:48:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1731685691; x=1731772091; bh=57bO79FeeQyzXAhjlTEgsYYGMtqvIxBT/Oqz76f/56c=; b= nWIp0u8QL/xZnl8ybuDhM4PSzJ0Znq1vlqOQ2eH0+deEjjn/ahoBfDvGDY15GJ59 WMuUskQhMNOezCb0/Njjz+o/iBRZ+MAs0Z5dkUzKdf7GzqhWAPZ8cUt81jq6DGaQ RF/SXGWaRzdYRu1b8Tqq7walinF+2AKluVtwSkLKN5PbP9JaPLygadprEgWlv60L HUUXOjLcupKXKM6Y4CVc+aJnUlU7S5AyTOoCpOlHM9vHbuji00D6jkkyKGHaZ2Fw yeng1t0xbF481hHtENyLWkW58Fp8CG8osCR9neQXbLUBN2qSzEBGxBfMowV1cFGR GM2zKGGtQbs0oH0phCCtCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731685691; x=1731772091; bh=5 7bO79FeeQyzXAhjlTEgsYYGMtqvIxBT/Oqz76f/56c=; b=UV/hi/cQ3XR81U7mS qHh1eIltKmNJHI1SZikzLnn7CEtihbDxK5p7dEuJmpsBr2w/G7EjK9tRva9hEdlh xRwsMg0oGQ0RRHo2nBevhKmknA8JIJQqLkZoq3iZgOf60DiLkpKQevmLuhVGdKeB 2wEDRKtYoSym3R/L0TQBXxfj6NkbbUklUd34BumraqHlSG/WiUPyyftPg3JK1hOB v/rhwTGq5VFpgpjuiAyOw8P9JW1gI4BbVpOf9FuOcshxrz82nF1GdTnh8Gvs1OBp B+TlT8n+mA6w0cGsEXJmtYv6MW4bbdfOOwTXu0zGZ5RI/5RY0Ubt5vtAnN9ibFGu bHPiw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvdeggdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecu hfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrg hklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepiedvhfeiheehgeeuieeljeei tedtjeehudegfeelkedvleekhedtgfeiffefkedunecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgr vhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepphgrthhrihgtkhdrfhhitghhvgesrghqshgrtghomhdrtghomhdprhgtphht thhopehpghhsqhhlqdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Nov 2024 10:48:10 -0500 (EST) Message-ID: Date: Fri, 15 Nov 2024 07:48:10 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Retrieve filename within a script To: Patrick FICHE , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.klaver@aklaver.com