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

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: (view raw, whole thread or download thread mbox)
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:


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


In response to


pgsql-hackers by date

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

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