Re: proposal: alternative psql commands quit and exit - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: alternative psql commands quit and exit
Date
Msg-id 1735.1512761160@sss.pgh.pa.us
Whole thread Raw
In response to Re: proposal: alternative psql commands quit and exit  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Dec 8, 2017 at 2:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'm not sure how we could get away with that.  Would it pass muster to do
>> that only when isatty(stdin)?  Other ideas?

> What if we made it so that "exit" or "quit" bails out entirely when
> not in a continuation line, and when entered on a continuation line,
> provided isatty(stdin), prints some kind of message telling you that
> you're in a continuation line?

Yeah, that might work.  As you say, if it only prints some chatter
(to stderr, I guess) without changing the semantics of the input,
it gets easier to defend.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: explain analyze output with parallel workers - question aboutmeaning of information for explain.depesz.com
Next
From: Robert Haas
Date:
Subject: Re: explain analyze output with parallel workers - question aboutmeaning of information for explain.depesz.com