From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Everaldo Canuto <everaldo(dot)canuto(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-01-15 15:32:56 |
Message-ID: | CA+TgmoZc1OYsPdsQCRbjV3M7jNkF--2NmHU4mdf9cuQW0JVLoQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 15, 2018 at 7:28 AM, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> Everaldo Canuto wrote:
>> Also I don't see a consensus on this thread and I don't understand how decisions are taken.
>
> It's just difficult to find consensus with many people.
>
> There were several valid concerns with this, the most striking (to me)
> was Tome's concern that there are perfectly valid multi-line SQL statements
> where a line could start with "exit" or "quit".
>
> Robert Haas had an idea how to provide useful hints without breaking anything,
> but it seemed a little complicated.
It's not really that complicated. Here's a patch. This follows what
Tom suggested in http://postgr.es/m/30157.1513058300@sss.pgh.pa.us and
what I suggested in
https://www.postgresql.org/message-id/CA%2BTgmoZswp00PtcgPfQ9zbbh7HUTgsLLJ9Z1x9E2s8Y7ep048g%40mail.gmail.com
I've discovered one thing about this design that is not so good, which
is that if you open a single, double, or dollar quote, then the
instructions that are provided under that design do not work:
rhaas=# select $$
rhaas$# quit
Use \q to quit or press control-C to clear the input buffer.
rhaas$# \q
rhaas$# well this sucks
rhaas$#
Obviously this leaves something to be desired, but I think it's
probably just a matter of rephrasing the hint somehow. I didn't have
a good idea off-hand though, so here's the patch as I have it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
quit-exit-rmh-v1.patch | application/octet-stream | 3.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-01-15 15:36:21 | Re: Rangejoin rebased |
Previous Message | Shubham Barai | 2018-01-15 15:29:25 | Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index |