On 2020-01-06 07:06, Tom Lane wrote:
> Hence, the attached revision only forces quoting in a SQL COPY
> command, or if the user already typed a quote.
Yes, that seems better. Users tend to not like if tab completion messes
with what they have already typed unless strictly necessary.
The file name completion portion of this patch seems to work quite well now.
I have found a weird behavior with identifier quoting, which is not the
subject of this patch, but it appears to be affected by it.
The good thing is that the new code will behave sensibly with
select * from "pg_cl<TAB>
which the old code didn't offer anything on.
The problem is that if you have
create table "test""1" (a int);
then the new code responds to
select * from "te<TAB>
by making that
select * from "te"
whereas the old code curiously handled that perfectly.
Neither the old nor the new code will produce anything from
select * from te<TAB>
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services