Prev: Helping the CommitFest re PL/Perl changes
Next: [HACKERS] MonetDB test says that PostgreSQL often has errors or missing results
From: David Christensen on 19 Jan 2010 17:00 On Jan 19, 2010, at 3:39 PM, Tom Lane wrote: > David Christensen <david(a)endpoint.com> writes: >> On Jan 19, 2010, at 2:58 PM, Stefan Kaltenbrunner wrote: >>> well those are the most common ones I guess for the current version >>> of the mysql commandline client - but what about future versions or >>> the fact that we only have partial replacements for some of those >>> that people are really asking for? > >> I think it captures the intent of the people using the tool, and that >> it adds a small net benefit in usability for those people. Deciding >> to support this small subset does not obligate you to expand the >> scope >> in the future. (Hey ma, this slope ain't slippery!) > > 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. Okay, so I can revise the code to cover those four cases specifically (or three, depending); is there any specific feedback as to the output/ formatting of the messages themselves? Currently, a session will look like the following: machack:machack:5485=# show tables; See: \d or \? for general help with psql commands machack:machack:5485=# Said formatting looks like it could use some improvement, open to suggestions, but something on a single line seems more useful. > Also, TTBOMK these commands have been in mysql for many years. I > don't > think that commands that might get introduced in future versions would > have anywhere near the same degree of wired-into-the-fingertips uptake > to them. They were in there since when I last used mysql on a regular basis, so going on 10 years now. i.e., pretty safe, and pretty engrained in muscle-memory. Regards, David -- David Christensen End Point Corporation david(a)endpoint.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: David Christensen on 19 Jan 2010 17:04 On Jan 19, 2010, at 3:57 PM, Devrim GÜNDÜZ wrote: > On Tue, 2010-01-19 at 11:25 -0800, Jeff Davis wrote: > >> I like that idea. There may be a lot of MySQL people that want to use >> the next postgresql release, and this would make it easier. > > 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? This is intended to be a gentle nudge in the right direction, not a replacement for their regular syntax. This does not perform the command in question, just points them to the right one, along with a general reminder that all kinds of good help is available via \?. > I have administrated lots of MySQL server until I started working for > Command Prompt (I still take a look at one once a month, for a > government related thing). > > +#define MYSQL_HELP_CHECK(o) \ > > 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'm not sure what you're saying here WRT Informix; if there is substantial desire and a large enough group that would find such newbie hints useful, I'd say we could generalize this more, but I don't think this patch obligates one to any such future proposals. > So, -1 from me for adding such a support for MySQL's cli commands. > -- > Devrim GÜNDÜZ, RHCE > Command Prompt - http://www.CommandPrompt.com > devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr > http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz Regards, David -- David Christensen End Point Corporation david(a)endpoint.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: "David E. Wheeler" on 19 Jan 2010 17:14 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 -- 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: Robert Haas on 19 Jan 2010 17:23 On Tue, Jan 19, 2010 at 5:14 PM, David E. Wheeler <david(a)kineticode.com> wrote: > 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. +1. I think this is a well-thought out proposal. I like Tom's suggestion upthread for how to handle \c. Although the deadline for patches for 8.5 has supposedly already passed.... ....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: Rob Wultsch on 19 Jan 2010 17:31
On Tue, Jan 19, 2010 at 3:14 PM, David E. Wheeler <david(a)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 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(a)gmail.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 |