Re: MySQL-ism help patch for psql - Mailing list pgsql-hackers

From Robert Haas
Subject Re: MySQL-ism help patch for psql
Date
Msg-id 603c8f071001200648x51a9933by6af7c72c618fc872@mail.gmail.com
Whole thread Raw
In response to Re: MySQL-ism help patch for psql  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: MySQL-ism help patch for psql  (Andrew Dunstan <andrew@dunslane.net>)
Re: MySQL-ism help patch for psql  (Dimitri Fontaine <dfontaine@hi-media.com>)
List pgsql-hackers
On Wed, Jan 20, 2010 at 9:26 AM, Peter Eisentraut <peter_e@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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Git out of sync vs. CVS
Next
From: Jaime Casanova
Date:
Subject: Re: lock_timeout GUC patch