Re: [PATCHES] Friendly help for psql
От | Bruce Momjian |
---|---|
Тема | Re: [PATCHES] Friendly help for psql |
Дата | |
Msg-id | 200801281912.m0SJCpc26859@momjian.us обсуждение исходный текст |
Ответы |
Re: [PATCHES] Friendly help for psql
Re: [PATCHES] Friendly help for psql |
Список | pgsql-hackers |
Alvaro Herrera wrote: > To avoid the usage of unadorned "help" (which I don't think is going to > ever cause conflicts with a SQL command but perhaps it's better to be > prepared), one idea would be to respond with "please execute \help > instead", and then \help would emit the verbose output. Perhaps > eventually we could adorn it with "\help category", etc. Uh, imagine: test=> SELECT * from pg_classtest-> help Technically 'help' is now an alias for 'pg_class'. Are you suggesting supporting 'help' in this usage? People were saying they forget semicolons, so this 'help' usage is quite possible. We don't want to hear "Why doesn't 'help' work sometimes?" I think the fundamental problem is that most programs, like ftp, have a predefined set of single-line commands, while we have an SQL 'language' that can be multi-line and has no special markings in psql. In fact the special marking is for help and psql-commands using backslash. Supporting 'help' in psql seems like a very slippery slope. We are very tight in defining when an entry is psql and when it is SQL and this weakens that. What would be interesting would be if the _server_ could send back some message about "Use the help facility of your client application" but it would have to have a trailing semicolon; unlikely. :-( -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-hackers по дате отправления: