From: "David E. Wheeler" on
On Jan 19, 2010, at 12:58 PM, Stefan Kaltenbrunner wrote:

> well providing a hint that one should use different command will only lead to the path "uhm why not make it work as well"

I don't think so. People know it's a different database. They'd be thrilled just to get the hint. I think it's a great idea (notwithstanding the caveats mentioned up-thread).

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: Andrew Dunstan on


David Christensen wrote:
>>
>> Quite apart from any considerations covered by other people, these
>> two at least could be positively misleading ... the psql commands are
>> not exact equivalents of the MySQL commands, AIUI.
>
> The \copy could definitely be considered a stretch; I know \c supports
> more options than the equivalent USE, but isn't it a proper superset
> of functionality?
>
>

Not really. "use" sets the default db in MySQL (and other DBs like
Sybase and MSSQL). But you don't really connect to a particular
database, unlike Postgres - you connect to the server. And you can
directly query other databases than the default, again unlike Postgres
where you can only directly query the database you're connected to. In
fact, "use" is part of MySQL's SQL dialect, and can be used from any
client, not just part of the metacommands of their commandline client.
See <http://dev.mysql.com/doc/refman/5.5/en/use.html>

cheers

andrew

--
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: Tom Lane on
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.

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.

regards, tom lane

--
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: Tom Lane on
David Christensen <david(a)endpoint.com> writes:
> On Jan 19, 2010, at 3:12 PM, Andrew Dunstan wrote:
>> Quite apart from any considerations covered by other people, these
>> two at least could be positively misleading ... the psql commands
>> are not exact equivalents of the MySQL commands, AIUI.

> The \copy could definitely be considered a stretch; I know \c supports
> more options than the equivalent USE, but isn't it a proper superset
> of functionality?

No, in fact I was going to bring up exactly that point, but Andrew beat
me to it. You can make a good case that mysql databases are more nearly
a match to PG schemas than to PG databases. So arguably instead of "use
foo" a mysql convert would prefer "set search_path = foo". This would
have been a serious headache if we'd accepted the earlier plan of trying
to implement equivalent functionality. In this patch, it could probably
be accommodated by having the help message read something like

Perhaps you want "\c database" or "set search_path = schema".

Or we could punt and leave this one out of the set that have help
messages.

regards, tom lane

--
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: Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= on
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?

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.

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