From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [PATCHES] Friendly help for psql |
Date: | 2008-01-28 19:12:51 |
Message-ID: | 200801281912.m0SJCpc26859@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
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_class
test-> 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Florian G. Pflug | 2008-01-28 19:26:15 | Re: CLUSTER and synchronized scans and pg_dump et al |
Previous Message | Bruce Momjian | 2008-01-28 18:56:30 | Re: [GENERAL] SHA1 on postgres 8.3 |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2008-01-28 19:55:22 | Re: [PATCHES] Friendly help for psql |
Previous Message | Andrew Dunstan | 2008-01-28 19:03:11 | Re: WIP: plpgsql source code obfuscation |