Re: MySQL-ism help patch for psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Christensen <david(at)endpoint(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, 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:53:37
Message-ID: 20539.1263938017@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Christensen <david(at)endpoint(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kurt Harriman 2010-01-19 21:55:30 Re: Patch: Remove gcc dependency in definition of inline functions
Previous Message Tom Lane 2010-01-19 21:40:54 Re: quoting psql varible as identifier