Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org, steven.winfield@cantabcapital.com
Date: 2020-01-13T16:34:37Z
Lists: pgsql-bugs, pgsql-hackers
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
Commits
-
Improve psql's tab completion for filenames.
- cd69ec66c886 13.0 landed
-
Modernize our readline API a tad.
- 5e7bedc5adba 13.0 landed
-
Add tab completion for EXPLAIN (SETTINGS) in psql
- 4b011cad272e 13.0 cited