Re: [PATCHES] Friendly help for psql - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [PATCHES] Friendly help for psql
Date
Msg-id 200801281912.m0SJCpc26859@momjian.us
Whole thread Raw
Responses Re: [PATCHES] Friendly help for psql  ("Greg Sabino Mullane" <greg@turnstep.com>)
Re: [PATCHES] Friendly help for psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Hans-Juergen Schoenig
Date:
Subject: Re: [PATCHES] Proposed patch: synchronized_scanning GUC variable
Next
From: "Florian G. Pflug"
Date:
Subject: Re: CLUSTER and synchronized scans and pg_dump et al