From: | "Greg Sabino Mullane" <greg(at)turnstep(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Friendly help for psql |
Date: | 2008-01-20 20:32:10 |
Message-ID: | 7e47ef7f7bb21beda78e6f4fffb0aac1@biglumber.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Tom Lane opined:
> The actual argument for doing this is nothing more nor less than
> "mysql does it like that". 99% of the people who will tell you this
> is user-friendly think so because they used mysql before coming to
> postgres.
No. While the original poster may have been making a separate comparison
to MySQL, I can assure you that my impetus for doing this is not being
driven by the behavior of the mysql client. Having "help" do something
other than throw a syntax error is a very common feature in many
interactive programs, for example openssl, gdb, ftp, bash, mail,
telnet, and vim.
> That might be sufficient reason to do it; I'm not sure. Personally
> I find it a really bad idea for psql to be usurping syntax that
> doesn't start with a backslash, but I don't suppose I'm representative
> of people who haven't absorbed the difference between psql and SQL.
Right: this is obviously aimed at people who are new to psql.
> Note that the mysql help facility covers both the mysql program and SQL
> commands (ie both \? and \h in our terminology) so the proposed patch
> is going to be seen as pretty lacking anyway by mysql-trained users.
It gets them pointed in the right direction.
> It's interesting to note that "help", "\h", and "\?" all provoke the
> same response(s) in mysql. Perhaps a patch that had had more than two
> seconds' design effort in it would do the same in psql; though I'm not
> sure what to do to disambiguate the case with no arguments.
I'm not looking to emulate MySQL, I'm looking to do something reasonable
when a user enters "help". Output that is generated in response to a user's
action is more likely to be read than something auto-generated at the
start of the session, and they should be able to take it from there.
Alvaro suggests:
> 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.
Ugh. Why make people do two steps?
- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200801201518
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFHk683vJuQZxSWSsgRA1F0AJ0RVQqd6LeIGsZDeyP78Y/WngpMdACfdrPZ
LJ5gmCbZ3OuXq6JK5C+BTEQ=
=flsE
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2008-01-20 20:35:23 | Re: [GENERAL] SHA1 on postgres 8.3 |
Previous Message | Tom Lane | 2008-01-20 20:08:40 | Re: bgwriter_lru_multiplier blurbs inconsistent |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2008-01-20 20:45:00 | Re: Friendly help for psql |
Previous Message | Alvaro Herrera | 2008-01-20 19:41:41 | Re: Friendly help for psql |