From: Euler Taveira de Oliveira on
David Christensen escreveu:
> I whipped up a quick patch for supporting some of the common mysql-based
> "meta" commands; this is different than some things which have been
> discussed in the past, in that it provides just a quick direction to the
> appropriate psql command, not an actual alternative syntax for the same
> action. This is not intended to be comprehensive, but just to provide
> proper direction
>
This idea was proposed and rejected later; search the archives. IMHO it's more
appropriated for a wiki page than a PostgreSQL-*especific* help command. If we
do that, we'll see requests like "why don't you add _my-favorite-db-here_ help
too?". So, -1.


--
Euler Taveira de Oliveira
http://www.timbira.com/

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Jeff Davis on
On Tue, 2010-01-19 at 20:52 +0100, Stefan Kaltenbrunner wrote:
> Jeff Davis wrote:
> >> I'm not convinced that we should start adding syntax helpers like that
> >> to psql. For now it is an arbitrary subset of MySQL stuff, are we going
> >> to add oracle/db2/mssql/drizzle/mariadb and whatnot later on?
> >> Also I can already see people asking "well you already know that this is
> >> that command - why not emulate it fully?".
> >
> > Good points. However, it only takes effect in interactive mode, so I
> > don't see it as a promise to do much. I'll make an analogy to:
> >
> > $ git difff
> > git: 'difff' is not a git-command. See 'git --help'.
> >
> > Did you mean this?
> > diff
>
> well the actual output is just:
>
> :~$ git difff
> git: 'difff' is not a git-command. See 'git --help'.

Well, the actual output on my machine is what I put in the email.

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.

Regards,
Jeff Davis


--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Tom Lane on
Jeff Davis <pgsql(a)j-davis.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.
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.

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.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Magnus Hagander on
On Tue, Jan 19, 2010 at 21:44, Tom Lane <tgl(a)sss.pgh.pa.us> wrote:
> Jeff Davis <pgsql(a)j-davis.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/

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: David Christensen on
> 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 have no problems paring down the list of cases; these were the
correspondences I saw off the top of my head. I definitely don't want
to conflict with any SQL syntax. The exact wording/output of the
messages can be adjusted at whim.

Regards,

David
--
David Christensen
End Point Corporation
david(a)endpoint.com





--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers