On Thu, Jul 4, 2024 at 4:56 PM Murthy Nunna <mnu...@fnal.gov> 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.