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

From Tom Lane
Subject Re: MySQL-ism help patch for psql
Date
Msg-id 20539.1263938017@sss.pgh.pa.us
Whole thread Raw
In response to Re: MySQL-ism help patch for psql  (David Christensen <david@endpoint.com>)
List pgsql-hackers
David Christensen <david@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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: quoting psql varible as identifier
Next
From: Kurt Harriman
Date:
Subject: Re: Patch: Remove gcc dependency in definition of inline functions