Re: MySQL-ism help patch for psql

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Alastair \"Bell\" Turner" <thebellhead(at)gmail(dot)com>, Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: MySQL-ism help patch for psql
Date: 2010-01-25 16:41:00
Message-ID: 603c8f071001250841y3c1631a3q5b42b220a4794c68@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 25, 2010 at 11:14 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Alastair "Bell" Turner wrote:
>>
>> If this option is designed to help people's transition - basically to
>> get to them before they've got to most of the manual - having to turn
>> it on will be pointless. It needs to be active by default.
>
> My problem with this whole idea is that it seems to be very MySQL-specific.
> Why aren't we providing help for users migrating from Oracle, Sybase,
> Informix, Ingres, DB2, SQLServer and Firebird, to name but a few? And if we
> turn all those on by default, we'll have a pretty horrible banner when
> starting psql.

I don't really have a horse in this race, but perhaps the answer is
that people are asking for MySQL help but no one is asking for help
migrating from any of those other databases. At least not yet. But I
think we're getting off into the weeds a little bit here. In theory,
people who notice that psql gives the following message should be OK:

Type "help" for help.

Now when you type help, you get this:

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

Now, at this point, if you are a MySQL user who wants to find the
equivalent of SHOW TABLES and DESCRIBE, it's very plausible that
you'll now try \h, because SHOW TABLES and DESCRIBE are SQL commands.
Then you might try some things like:

\h SHOW
\h TABLE

...hoping to find what you're looking for. If you eventually go back
and try \? you will hopefully notice this line (which at least in my
terminal window doesn't even show up until the second page):

\d[S+] list tables, views, and sequences

It's not too much to hope that you'll try \d at this point and get a
list of all your tables, but it's far from clear how you'd know that
"\d foo" is the way to get the column definitions for foo.

Maybe instead of (or in addition to) providing MySQL-specific help, we
should find a way to emphasize the "\d" and "\d table" commands,
because those are (IMO) two big things that people coming from ANY
other database product are likely to want to find, and it's not as
easy to find them right now as perhaps it should be.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2010-01-25 16:49:55 Re: MySQL-ism help patch for psql
Previous Message David Fetter 2010-01-25 16:40:43 A Plea to Patchers