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

From Rob Wultsch
Subject Re: MySQL-ism help patch for psql
Date
Msg-id 2c5ef4e31001191431y32d3539u75f43069bc5bcd7e@mail.gmail.com
Whole thread Raw
In response to Re: MySQL-ism help patch for psql  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: MySQL-ism help patch for psql
List pgsql-hackers
On Tue, Jan 19, 2010 at 3:14 PM, David E. Wheeler <david@kineticode.com> wrote:
> On Jan 19, 2010, at 1:39 PM, Tom Lane wrote:
>
>> I thought Magnus had a really good point: covering these four cases will
>> probably be enough to teach newbies to look at psql's backslash
>> commands.  And once they absorb that, we're over a big hump.
>
> +1
>
> On Jan 19, 2010, at 1:57 PM, Devrim GÜNDÜZ wrote:
>
>> I disagree. If they want to use PostgreSQL, they should learn our
>> syntax. How can you make sure that this will be enough for them? What if
>> they want more?
>
> Why would they want more? It's not MySQL, and they know that. If we give them some very minor helpful hints for the
mostcommon things they try to do, it would be a huge benefit to them. I know I've badly wanted the opposite when I've
hadto use MySQL, but I don't expect MySQL to implement \c for me. 
>
>> What if some other people will come up with the idea of adding similar
>> functionality for their favorite database? The only exception will be
>> Informix IMHO, because of historical reasons.
>
> I think it'd be helpful for other databases, too. Oracle comes to mind: What commands are finger-trained in Oracle
DBAs?
>
> Best,
>
> David
>

As a MySQL DBA the commands I think are most useful are:
show databases (please punt this, most MySQL dba's that I have worked
with will need to consider the difference between a db and a schema)
use database (please punt)
LOAD DATA INFILE(please punt, they should look at the manual as COPY
is... well, more limited)
show tables
desc(ribe) table
show processlist


I suggest adding:
+                       else if (MYSQL_HELP_CHECK("show processlist"))
+                       {
+                               MYSQL_HELP_OUTPUT("SELECT * from
pg_stat_activity");
+                       }
+                       else if (MYSQL_HELP_CHECK("desc"))
+                       {
+                               MYSQL_HELP_OUTPUT("\\d tablename");
+                       }



--
Rob Wultsch
wultsch@gmail.com


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Missing docs for SR
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Mammoth in Core?