From: Robert Haas on
On Mon, Jan 25, 2010 at 11:14 AM, Andrew Dunstan <andrew(a)dunslane.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

--
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: "Ross J. Reedstrom" on
On Mon, Jan 25, 2010 at 06:06:53PM +0200, Alastair Bell Turner wrote:
<..>
> without having to add a switch to their command lines. It's not going
> to have anything to say to experienced psql users anyway so it would
> probably not bug anyone enough to turn it off.

I would so use this feature going the other way: fire up comfortable
psql and see what mysql command I need to type ... Having it in the
interface (behind \help [mysql|oracle|firebird|mssql|..] seems reasonable
to me, given how much info we already have in \help. I find the basic
BNF help for SQL syntax still useful reminder, and know to go to the
actual docs when there's not enough there. So a quick mapping of
most-needed commands, and a pointer to the docs for the full
ramifications and subtle differences seems to fit the existing
documentation module.

Ross
--
Ross Reedstrom, Ph.D. reedstrm(a)rice.edu
Systems Engineer & Admin, Research Scientist phone: 713-348-6166
The Connexions Project http://cnx.org fax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E F888 D3AE 810E 88F0 BEDE


--
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: "Ross J. Reedstrom" on
On Mon, Jan 25, 2010 at 10:49:55AM -0600, Ross J. Reedstrom wrote:
> On Mon, Jan 25, 2010 at 06:06:53PM +0200, Alastair Bell Turner wrote:
> <..>
> > without having to add a switch to their command lines. It's not going
> > to have anything to say to experienced psql users anyway so it would
> > probably not bug anyone enough to turn it off.
>
> I would so use this feature going the other way: fire up comfortable
> psql and see what mysql command I need to type ... Having it in the
> interface (behind \help [mysql|oracle|firebird|mssql|..] seems reasonable
> to me, given how much info we already have in \help. I find the basic

> BNF help for SQL syntax still useful reminder, and know to go to the

Well, behind \migrate or some other word as others have, since I see
\help is just the SQL help I so praised.

Ross
--
Ross Reedstrom, Ph.D. reedstrm(a)rice.edu
Systems Engineer & Admin, Research Scientist phone: 713-348-6166
The Connexions Project http://cnx.org fax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E F888 D3AE 810E 88F0 BEDE


--
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: Greg Smith on
Ross J. Reedstrom wrote:
> So a quick mapping of most-needed commands, and a pointer to the docs for the full
> ramifications and subtle differences seems to fit the existing
> documentation module.
>

And that's been done at least twice already:

http://blog.endpoint.com/2009/12/mysql-and-postgres-command-equivalents.html
http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL

--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(a)2ndQuadrant.com www.2ndQuadrant.com


--
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
Ross J. Reedstrom wrote:
> On Mon, Jan 25, 2010 at 06:06:53PM +0200, Alastair Bell Turner wrote:
> <..>
> > without having to add a switch to their command lines. It's not going
> > to have anything to say to experienced psql users anyway so it would
> > probably not bug anyone enough to turn it off.
>
> I would so use this feature going the other way: fire up comfortable
> psql and see what mysql command I need to type ... Having it in the
> interface (behind \help [mysql|oracle|firebird|mssql|..] seems reasonable
> to me, given how much info we already have in \help. I find the basic
> BNF help for SQL syntax still useful reminder, and know to go to the
> actual docs when there's not enough there. So a quick mapping of
> most-needed commands, and a pointer to the docs for the full
> ramifications and subtle differences seems to fit the existing
> documentation module.

It would be interesting to implement \help mysql, and then have commands
like SHOW TABLE trigger a message suggesting they do \help mysql.

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