Prev: Helping the CommitFest re PL/Perl changes
Next: [HACKERS] MonetDB test says that PostgreSQL often has errors or missing results
From: Peter Eisentraut on 20 Jan 2010 08:36 On tis, 2010-01-19 at 16:00 -0600, David Christensen wrote: > Currently, a session will look like the following: > > machack:machack:5485=# show tables; > See: > \d > or \? for general help with psql commands > machack:machack:5485=# I think if you make "show tables" and the others actually execute \d and then possibly print a notice about what the "better" command would have been, you actually *help* people do their work instead of appearing to be a smartass -- "See, we took the time to research what you want to do, and here is why it's wrong." Moreover, the backslash is really hard to type on some keyboards, so I'd expect significant uptake for people to use the SHOW variants as their primary method. -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Bruce Momjian on 20 Jan 2010 09:05 Peter Eisentraut wrote: > On tis, 2010-01-19 at 16:00 -0600, David Christensen wrote: > > Currently, a session will look like the following: > > > > machack:machack:5485=# show tables; > > See: > > \d > > or \? for general help with psql commands > > machack:machack:5485=# > > I think if you make "show tables" and the others actually execute \d and > then possibly print a notice about what the "better" command would have > been, you actually *help* people do their work instead of appearing to > be a smartass -- "See, we took the time to research what you want to do, > and here is why it's wrong." > > Moreover, the backslash is really hard to type on some keyboards, so I'd > expect significant uptake for people to use the SHOW variants as their > primary method. I disagree. No one has complained that we are being a "smartass" by reporting this for "help" in psql: You are using psql, the command-line interface to PostgreSQL. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit while to be really helpful we would display \?. After extensive discussion we chose against that because we wanted to steer people to the proper commands, rather than have them consider 'help' as a valid command. The same is true for the MySQL commands --- we just want to point people to the proper commands. -- Bruce Momjian <bruce(a)momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Peter Eisentraut on 20 Jan 2010 09:26 On ons, 2010-01-20 at 09:05 -0500, Bruce Momjian wrote: > I disagree. No one has complained that we are being a "smartass" by > reporting this for "help" in psql: > > You are using psql, the command-line interface to PostgreSQL. > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > while to be really helpful we would display \?. After extensive > discussion we chose against that because we wanted to steer people to > the proper commands, rather than have them consider 'help' as a valid > command. The same is true for the MySQL commands --- we just want to > point people to the proper commands. That's not the same thing. The user typed "help" and you help him. If the user types "show tables", you show him the tables. If the user typed "show tables" and you send him a help message, that is not what the user wanted. -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Robert Haas on 20 Jan 2010 09:27 On Wed, Jan 20, 2010 at 9:05 AM, Bruce Momjian <bruce(a)momjian.us> wrote: > Peter Eisentraut wrote: >> On tis, 2010-01-19 at 16:00 -0600, David Christensen wrote: >> > Currently, a session will look like the following: >> > >> > machack:machack:5485=# show tables; >> > See: >> > \d >> > or \? for general help with psql commands >> > machack:machack:5485=# >> >> I think if you make "show tables" and the others actually execute \d and >> then possibly print a notice about what the "better" command would have >> been, you actually *help* people do their work instead of appearing to >> be a smartass -- "See, we took the time to research what you want to do, >> and here is why it's wrong." >> >> Moreover, the backslash is really hard to type on some keyboards, so I'd >> expect significant uptake for people to use the SHOW variants as their >> primary method. > > I disagree. No one has complained that we are being a "smartass" by > reporting this for "help" in psql: > > You are using psql, the command-line interface to PostgreSQL. > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > while to be really helpful we would display \?. After extensive > discussion we chose against that because we wanted to steer people to > the proper commands, rather than have them consider 'help' as a valid > command. The same is true for the MySQL commands --- we just want to > point people to the proper commands. +1. ....Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Robert Haas on 20 Jan 2010 09:48
On Wed, Jan 20, 2010 at 9:26 AM, Peter Eisentraut <peter_e(a)gmx.net> wrote: > On ons, 2010-01-20 at 09:05 -0500, Bruce Momjian wrote: >> I disagree. No one has complained that we are being a "smartass" by >> reporting this for "help" in psql: >> >> You are using psql, the command-line interface to PostgreSQL. >> Type: \copyright for distribution terms >> \h for help with SQL commands >> \? for help with psql commands >> \g or terminate with semicolon to execute query >> \q to quit >> >> while to be really helpful we would display \?. After extensive >> discussion we chose against that because we wanted to steer people to >> the proper commands, rather than have them consider 'help' as a valid >> command. The same is true for the MySQL commands --- we just want to >> point people to the proper commands. > > That's not the same thing. The user typed "help" and you help him. If > the user types "show tables", you show him the tables. If the user > typed "show tables" and you send him a help message, that is not what > the user wanted. If what the user wanted was to be using MySQL, he is out of luck anyway. I'm actually no big advocate of the \d commands. They're basically magical queries that you can't easily see or edit - I've more than once wished for a WHERE clause (\df WHERE "Result data type" = 'internal' or what have you. But I don't have a practical solution for dealing with that problem, and I think trying to emulate MySQL is probably not a good idea... what if we wanted to make "USE" actually mean something some day? If it just prints out a helpful error message, that could still be possible (and we lose the helpful error message), but if people are expecting it to work, we're hosed. ....Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |