Re: MySQL-ism help patch for psql

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, David Christensen <david(at)endpoint(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MySQL-ism help patch for psql
Date: 2010-01-19 20:49:37
Message-ID: 9837222c1001191249o2dacba49v4b529137c22dd521@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 19, 2010 at 21:44, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jeff Davis <pgsql(at)j-davis(dot)com> writes:
>> That being said, I don't have much of an opinion, so if you see a
>> problem, then we can forget it. After all, we would need some kind of a
>> prefix anyway to avoid conflicting with actual SQL... maybe "\m"? And
>> that defeats a lot of the purpose.
>
> Yeah, requiring a prefix would make it completely pointless I think.

Definitely.

> The submitted patch tries to avoid that by only matching syntax that's
> invalid in Postgres, but that certainly limits how far we can go with
> it.  (And like you, I'm a bit worried about the LOAD case.)
>
> The last go-round on this was just a couple months ago:
> http://archives.postgresql.org/pgsql-bugs/2009-11/msg00241.php
> although I guess that was aimed at a slightly different idea,
> namely making "show databases" etc actually *work*.  This one at
> least has a level of complication that's more in keeping with the
> possible gain.

I think the gain is actually better with this than to try to do the
work. We'd want it to teach people what to do.

> The previous discussion started from the idea that only DESCRIBE,
> SHOW DATABASES/TABLES, and USE were worth worrying about.  If we
> were to agree that we'd go that far and no farther, the potential
> conflict with SQL syntax would be pretty limited.  I have little
> enough experience with mysql to not want to opine too much on how
> useful that would be, but it does seem like those are commands
> I use right away anytime I am using mysql.

I think just getting te most common cases would still be quite
helpful. Once you get the user to realize that "hey, that backslash
thing seems to do stuff", you've gone most of the way.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Christensen 2010-01-19 20:54:36 Re: MySQL-ism help patch for psql
Previous Message Tom Lane 2010-01-19 20:44:35 Re: MySQL-ism help patch for psql