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

Re: [PATCHES] Friendly help for psql

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] Friendly help for psql
Date: 2008-01-28 19:55:22
Message-ID: 8a5cbf29b92a07318e65fc89a33a7832@biglumber.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> 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 don't think we have to worry about supporting that case. We only
support it when the command begins with "help". No ambiguity with
SQL to worry about. Don't forget that ctrl-c resets a query as well, so
the above situation is not as dire as it may appear to the uninitiated
user.

> 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.

Does not seem slippery to me, seems a simple, one-time fix that replaces
a syntax error with a helpful message. As the instigator of this discussion,
I can assure you I have no plans for anything other than "help". It's simple,
standard, and points you to anything else you may need or want to do.

> 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.  :-(

Now THAT would be a bad mangling of SQL and non-SQL. We'll pretend you
didn't suggest that one. :)

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200801281451
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFHnjJgvJuQZxSWSsgRA8mMAJ4jzlrwYDVguUNt2yAwMTXMvV1S3QCg+SaF
n8ybxb/KbGBxW9aouZGpzaY=
=igJU
-----END PGP SIGNATURE-----



In response to

pgsql-hackers by date

Next:From: Decibel!Date: 2008-01-28 20:03:04
Subject: Mail issue
Previous:From: Florian G. PflugDate: 2008-01-28 19:26:15
Subject: Re: CLUSTER and synchronized scans and pg_dump et al

pgsql-patches by date

Next:From: Dean RasheedDate: 2008-01-28 19:55:53
Subject: Re: Auto-explain patch
Previous:From: Bruce MomjianDate: 2008-01-28 19:12:51
Subject: Re: [PATCHES] Friendly help for psql

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