From: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Add SHELL_EXIT_CODE to psql |
Date: | 2023-01-23 20:31:33 |
Message-ID: | CADkLM=eKrmuVKy+PFomefeJfp87m0nw8zZu6rEz-vNGWCWHQiQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 23, 2023 at 2:53 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Jan 23, 2023 at 1:59 PM Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
> wrote:
> > SHELL_ERROR is helpful in that it is a ready-made boolean that works for
> \if tests in the same way that ERROR is set to true any time SQLSTATE is
> nonzero. We don't yet have inline expressions for \if so the ready-made
> boolean is a convenience.
>
> Oh, that seems a bit sad, but I guess it makes sense.
>
I agree, but there hasn't been much appetite for deciding what expressions
would look like, or how we'd implement it. My instinct would be to not
create our own expression engine, but instead integrate one that is already
available. For my needs, the Unix `expr` command would be ideal (compares
numbers and strings, can do regexes, can do complex expressions), but it's
not cross platform.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-01-23 20:38:06 | Re: Making Vars outer-join aware |
Previous Message | Andres Freund | 2023-01-23 20:31:28 | Re: Add the ability to limit the amount of memory that can be allocated to backends. |