Re: proposal: alternative psql commands quit and exit

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Everaldo Canuto <everaldo(dot)canuto(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: alternative psql commands quit and exit
Date: 2018-02-02 05:39:28
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I just thought of an inconsistency. First, we now consistently exit with
'exit', 'quit', and '\q' if used in an empty psql query buffer. Also, we now
hint when 'exit' and 'quit' are used in non-empty query buffers:

test=> SELECT
test-> exit
--> Use \q to quit.

We obviously don't need to hint for '\q' since it works in this context.

Where it is odd is that we hint for 'exit' and 'quit' in places that
'\q' doesn't work, but we don't hint for '\q' in the same contexts.
Here is the hint for 'exit' and 'quit':

test=> SELECT '
test'> exit
--> Use control-D to quit.

but we don't hint for '\q':

test=> SELECT '
test'> \q
--> test'>

Should we give the same "Use control-D to quit." hint here for '\q'?
I think it is logical that we should.

Bruce Momjian <bruce(at)momjian(dot)us>

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-02-02 06:04:17 Re: [HACKERS] path toward faster partition pruning
Previous Message Thomas Munro 2018-02-02 05:22:34 Re: JIT compiling with LLVM v9.0