What about having an alias ability in the client which simply regexes the command line and converts it to something else. Surely this woul dbe more extensible and flexible that the solutions mentioned so far?
For instance, I could alias s/\s*SHOW TABLES/i with an I_S query that did the equivalent. I could alias "ls" as listing databases, etc. A simple client function register_alias() which accepted a couple strings, and is evaluated either as a flat strcmp or regex would give the client great flexibility. Cheers, Jay Sheeri K. Cabral wrote: > On 7/18/08, Mark Atwood <[EMAIL PROTECTED]> wrote: >> >> On Jul 18, 2008, at 7:47 AM, Sheeri K. Cabral wrote: >> >> \ >>> Why not just move all the show == I_S logic into the client level? It's >>> in the client that "show databases" matters anyway. That way we can keep >>> the commands but remove them from the server... >>> >>> My only caveat is that some folks use this programmatically, so by >>> "client" I'd caution for it to be in the "client API libraries" or whatever >>> -- Often folks will use things like "show tables" in a PHP script......just >>> clarifying to make sure we're all on the same page wrt "client" vs. "mysql >>> program which is a commandline client". >>> >> >> People who programmatically get database information, can use the I_S. >> That's what it's for, and it's better for it. > > > Nobody is disagreeing with that. However, currently many folks use SHOW > commands instead of the INFORMATION_SCHEMA. I'm trying to consider > compatibility with currently running MySQL applications. Also, the sheer > usability of the SHOW command is exactly why so many people can use it. A > new user doesn't need to understand SQL's SELECT....FROM...WHERE syntax to > be able to see databases or tables. > > If the information schema is the only way to get information, that part of > the "easy to use" for new people goes away. > > I'd lean towards making it compatible, but have SHOW commands be syntactic > sugar for INFORMATION_SCHEMA queries. And as I said earlier, an easy way to > make your own syntactic sugar would be great, so people can make "pretty" > commands such as SHOW QUERY_CACHE STATS. > > -Sheeri > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Mailing list: https://launchpad.net/~drizzle-discuss > Post to : [email protected] > Unsubscribe : https://launchpad.net/~drizzle-discuss > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

