Re: MySQL-ism help patch for psql

From: Rob Wultsch <wultsch(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: David Christensen <david(at)endpoint(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: MySQL-ism help patch for psql
Date: 2010-01-19 22:31:30
Message-ID: 2c5ef4e31001191431y32d3539u75f43069bc5bcd7e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 19, 2010 at 3:14 PM, David E. Wheeler <david(at)kineticode(dot)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 most common things they try to do, it would be a huge benefit to them. I know I've badly wanted the opposite when I've had to 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(at)gmail(dot)com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2010-01-19 22:34:54 Re: Mammoth in Core?
Previous Message Josh Berkus 2010-01-19 22:30:52 Missing docs for SR