Re: MySQL-ism help patch for psql

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: David Christensen <david(at)endpoint(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: MySQL-ism help patch for psql
Date: 2010-01-19 21:39:16
Message-ID: 4B562684.1080009@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-19 21:39:57 Re: MySQL-ism help patch for psql
Previous Message Markus Wanner 2010-01-19 21:34:40 Re: Testing with concurrent sessions