Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless)
Date: 2017-02-14 10:22:57
Message-ID: alpine.DEB.2.20.1702141109500.20948@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> For two states:
>> * for being executed (beware, it is ***important***)
>
> It does lend importance, but that's also the line continuation marker for
> "comment". Would that be a problem?

Argh. Indeed, even if people seldom type C comments in psql interactive
mode...

Remaining ASCII characters I can thing of, hopefully avoiding already used
ones: +%,@$\`|&:;_

So, maybe consider these ones:
"+" for it is "on"
"`" which is a "sub-shell execution"
"&" for "and the next command is ..."

>> / for not (under the hood, and it is opposed to *)
>
> +1, I was going to suggest '/' for a false state, with two possible
> metaphors to justify it
> 1. the slash in a "no" sign ("no smoking", ghostbusters, etc)
> 2. the leading char of a c/java/javascript comment (what is written here
> is just words, not code)

Great.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2017-02-14 10:44:04 PostgreSQL Code of Conduct Draft
Previous Message David Rowley 2017-02-14 10:17:40 Re: Small improvement to parallel query docs