Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Friendly help for psql

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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. +

In response to

Responses

pgsql-hackers by date

Next:From: Florian G. PflugDate: 2008-01-28 19:26:15
Subject: Re: CLUSTER and synchronized scans and pg_dump et al
Previous:From: Bruce MomjianDate: 2008-01-28 18:56:30
Subject: Re: [GENERAL] SHA1 on postgres 8.3

pgsql-patches by date

Next:From: Greg Sabino MullaneDate: 2008-01-28 19:55:22
Subject: Re: [PATCHES] Friendly help for psql
Previous:From: Andrew DunstanDate: 2008-01-28 19:03:11
Subject: Re: WIP: plpgsql source code obfuscation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group