From: Jeff Davis on
On Tue, 2010-01-19 at 12:44 -0600, David Christensen wrote:
> Hey -hackers,
>
> 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

I like that idea. There may be a lot of MySQL people that want to use
the next postgresql release, and this would make it easier.

Please add the patch to the next commitfest:

https://commitfest.postgresql.org/action/commitfest_view?id=6

It's small enough that, if others like it as well, maybe it (or
something similar) could still make it in this release.

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: Stefan Kaltenbrunner on
Jeff Davis wrote:
> On Tue, 2010-01-19 at 12:44 -0600, David Christensen wrote:
>> Hey -hackers,
>>
>> 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
>
> I like that idea. There may be a lot of MySQL people that want to use
> the next postgresql release, and this would make it easier.
>
> Please add the patch to the next commitfest:
>
> https://commitfest.postgresql.org/action/commitfest_view?id=6
>
> It's small enough that, if others like it as well, maybe it (or
> something similar) could still make it in this release.

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?".
So -1 on the general idea of providing that kind of stuff (though I
think there is plenty of opportunity to make psql more useful in itself).


Stefan

--
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
> 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

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: Jeff Davis on
On Tue, 2010-01-19 at 11:43 -0800, 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:
>

On second thought, if it's not a very restricted set of words, it might
limit what commands we can introduce later. In particular I notice that
it uses "load" which is too similar to postgresql's LOAD.

I think the words would need to be prefixed with something to separate
them from normal commands.

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: Stefan Kaltenbrunner on
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'.


which is more or less the same as:

postgres=# \mysql
Invalid command \mysql. Try \? for help.

so I don't really see why we need to add some random second guessing of
what the user actually wanted (and if he is indeed a mysql refugee he
can always use "help" and go on from there).


Stefan

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