From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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-01-15 16:10:44 |
Message-ID: | CA+TgmoZG6-LxMMu4si4GuJnYvKXJKBrthe2DEXsCQW4uYRwmkQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jan 15, 2018 at 10:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> 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:
>
> I was kind of imagining that we could make the hint text vary depending
> on the parsing state. Maybe that's too hard to get to --- but if the
> prompt-creating code knows what it is, perhaps this can too.
prompt_status does seem to be available in psql's MainLoop(), so I
think that could be done, but the problem is that I don't know exactly
what message would be useful to print when we're in a "in quotes"
state. If I had a good message text for that state, I might just
choose to use it always rather than multiplying the number of
messages.
More broadly, I think what is needed here is less C-fu than
English-fu. If we come up with something good, we can make it print
that thing.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Geoff Winkless | 2018-01-15 16:13:15 | Re: proposal: alternative psql commands quit and exit |
Previous Message | Robert Haas | 2018-01-15 16:04:55 | Re: proposal: alternative psql commands quit and exit |