RE: BUG #16059: Tab-completion of filenames in COPY commandsremoves required quotes

Поиск
Список
Период
Сортировка
От Steven Winfield
Тема RE: BUG #16059: Tab-completion of filenames in COPY commandsremoves required quotes
Дата
Msg-id E9FA92C2921F31408041863B74EE4C2001BD9FF8A1@CCPMAILDAG03.cantab.local
обсуждение исходный текст
Ответ на Re: BUG #16059: Tab-completion of filenames in COPY commands removesrequired quotes  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-bugs
> Not saying it's not a bug, but bear in mind psql CAN NOT correctly
> complete filenames for SERVER SIDE copy. You may be running in the same
> machine, but even with this and using unix domain sockets it's difficult
> to know what is at the other end of the socket ( not sure if you can
> always know it even if you are root, and you can have things like psql
> connecting through unix domain socket to pgbouncer which forwards to I-do-
> not-know-where (.com) .

That's very true, but at some point the decision was made to tab-complete COPY commands using information from the
localfilesystem, since that might be useful.
 
I doubt there was ever an intention to take an otherwise-well-formed (partial) COPY command and make it invalid by
removinga single quote in the middle of it!
 

> They are different beasts, in \copy you are not completing an sql command
> to send to the server, you are completing a command to psql ( which it
> implemts using an sql command plus some magic ).

Yep, I'm aware of that - I'm just pointing out the difference in syntax between the two commands, which I had always
believedto be near-drop-in replacements for each other syntax-wise. 
 
It's also relevant because the same tab-completion code is used for both \copy and COPY and currently can't distinguish
betweenthem.
 

Perhaps complete_from_files() needs an extra argument to specify the quoting behaviour.

Steven

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Francisco Olarte
Дата:
Сообщение: Re: BUG #16059: Tab-completion of filenames in COPY commands removesrequired quotes
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16060: JDBC - badly gets DateOffsetTime value from database