public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Murthy Nunna <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: psql help
Date: Thu, 4 Jul 2024 18:16:32 -0700
Message-ID: <CAKFQuwaYLtg0W4He0VGfqSTKSj+69sSq_5esqBVTHwSrPfMLmw@mail.gmail.com> (raw)
In-Reply-To: <DM8PR09MB6677C5B4FDBDFC0F82298DC7B8DE2@DM8PR09MB6677.namprd09.prod.outlook.com>
References: <DM8PR09MB6677C5B4FDBDFC0F82298DC7B8DE2@DM8PR09MB6677.namprd09.prod.outlook.com>
On Thu, Jul 4, 2024 at 4:56 PM Murthy Nunna <[email protected]> wrote:
>
>
> How can I rewrite the above in psql
>
The only real trick is using a psql variable instead of the shell-injection
of the environment variable. Use the --set CLI argument to assign the
environment variable to a psql variable then refer to it in the query using
:'timout_mins'
Removing the limit 1 should be as simple as not typing limit 1 when you
bring the query into the psql script.
David J.
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: psql help
In-Reply-To: <CAKFQuwaYLtg0W4He0VGfqSTKSj+69sSq_5esqBVTHwSrPfMLmw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox