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

From Andrew Dunstan
Subject Re: MySQL-ism help patch for psql
Date
Msg-id 4B562684.1080009@dunslane.net
Whole thread Raw
In response to Re: MySQL-ism help patch for psql  (David Christensen <david@endpoint.com>)
List 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


pgsql-hackers by date:

Previous
From: Markus Wanner
Date:
Subject: Re: Testing with concurrent sessions
Next
From: Tom Lane
Date:
Subject: Re: MySQL-ism help patch for psql