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 1uHBtP-00F9Y7-Ip for pgsql-admin@arkaria.postgresql.org; Tue, 20 May 2025 01:35:44 +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 1uHBtN-002qJX-K7 for pgsql-admin@arkaria.postgresql.org; Tue, 20 May 2025 01:35:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHBtN-002qJP-6r for pgsql-admin@lists.postgresql.org; Tue, 20 May 2025 01:35:41 +0000 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHBtK-002rsD-1V for pgsql-admin@lists.postgresql.org; Tue, 20 May 2025 01:35:40 +0000 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-60634f82c77so1439191eaf.1 for ; Mon, 19 May 2025 18:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747704937; x=1748309737; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=N0M6BDeM7OK49r0HBnT/suesCJBZUx3SKKo/tk0UBug=; b=cvtDxd+TIeS3uLPgDYtBDCv9KPYQzEvwh2S7rWpnxjR6ZQb+tDHWlFUaseRl6GlnFf IVuJERlreWBd55YsGV1x9f/1Qjc/8pNvEnQ/r02tm008npV0+7SaF4cgDcyIjJP+DwLh wqgr8+8CrgO1izkwoxKzOyIUqgWMbXHVFCiYbV7cSchyAkOjHD20lothmb1UGSZ9QQNJ dDlBu8OcHQztUXD1I7s88a+l9gt3pJQPH5I1SXM0NML1dOIdx5+852O7hROPSyrzIIIP jTLS5oGJbMvFqpF9cM4qXxhHH1ED3HoxpyZMYzoKxQ9N8ji03C7vUE1adLWs4oPFQkjb yo5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747704937; x=1748309737; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N0M6BDeM7OK49r0HBnT/suesCJBZUx3SKKo/tk0UBug=; b=tpia+wAC7P8Ow2wbJW/Ml+Hr3cGk2HpvPTJ3xdIQEdAc1NJ8cGr1FDVm9NfQBxHL4o Of2PzCRCIKLuz6LiCdkNCp9Xg2qRoa3GNTz9KLU0JbjrZKKjB0+gwCNv5li8OyaIPRld +HkanR8tBmuSTQ5Nl4Pc8Iju0wMzt5mtVg1v251Lkcd+FZiJIgdO4WqblgEwJdhbiG5t OFZQeNr+2bH28BqfZW611ReLvuZMNaJlKJSjYzRzPm2AM4eVaBsPnW7HhtwLcs6NoKC5 PWKCOys7prQ4/OLa1q5Q4u09eG5oDky+ccyvwyfeqQHmciWmIqBD+6JjYoYgFU1GBCu+ Hh8w== X-Gm-Message-State: AOJu0YxRLDuajw5HKitRYUE78zCGPf6GmqFsrx/uf/vlBzOaA+N2GVXH P8vjaSQKzqUgejrQmiJJjH3XWUmAUvP8/PYuMlZgymrCGf7pzduqO/azSkWkWGauTAQxGA0+iLU eY7vKKWq8Xy1RHKstTrbQIRccp0eBMCEC6PoB X-Gm-Gg: ASbGncs/c8/5iEEt70rw2U92qCpt9CFhADGwT5detLibtybhY7DdIZCvrc0g2FK/9Rn pgNU5cpsiRw3WL6usvRHw/y2v4rkdPkgqcKBUEydQl8Vi2VAsHUDlBk2UTI7wqPlQuF47NEFjC1 72LdDpzzb09RxTLuzLVqgXytTmLqukR1q6JA== X-Google-Smtp-Source: AGHT+IGRJlkDUZVY8oyxcM+/Hbwe8ESE41p+gWgxyG08fqZsHJBxYb5Xawdzi5/dNVKGqQJMt7zDsrd3AAoQFMjVPd8= X-Received: by 2002:a05:6820:188e:b0:603:fada:ac53 with SMTP id 006d021491bc7-609f48de6e9mr8693867eaf.2.1747704937235; Mon, 19 May 2025 18:35:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6802:2204:b0:5c9:f01c:52e7 with HTTP; Mon, 19 May 2025 18:35:36 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Mon, 19 May 2025 18:35:36 -0700 X-Gm-Features: AX0GCFt-_CVDPfQcZR24DJmySO1a81_KDGEUn287DkJ0mEBK9R68a0pRpWE-CDQ Message-ID: Subject: Re: PATH for your scripts/SQL for psql To: Edwin UY Cc: Pgsql-admin Content-Type: multipart/alternative; boundary="000000000000f4cc560635874350" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f4cc560635874350 Content-Type: text/plain; charset="UTF-8" On Monday, May 19, 2025, Edwin UY wrote: > Hi, > > 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. > Unable to test it right now but in Linux you should be able to add a shebang line at the top and make the file executable. Then make sure it is in PATH. David J. --000000000000f4cc560635874350 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Monday, May 19, 2025, Edwin UY <edwin.uy@gmail.com> wrote:
Hi,

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 sett= ings where you can PATH to it and you just run your command/scripts
FYI, I am NOT using psql on the database server.

Unable to test it right now but in Linux you should be= able to add a shebang line at the top and make the file executable.=C2=A0 = Then make sure it is in PATH.

David J.
= =C2=A0
--000000000000f4cc560635874350--