From: "Joshua D. Drake" on 15 Jul 2010 11:48 On Thu, 2010-07-15 at 16:20 +0100, Simon Riggs wrote: > On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote: > > Simon Riggs <simon(a)2ndQuadrant.com> writes: > > > The biggest turn off that most people experience when using PostgreSQL > > > is that psql does not support memorable commands. > > > > > I would like to implement the following commands as SQL, allowing them > > > to be used from any interface. > > > > > SHOW TABLES > > > SHOW COLUMNS > > > SHOW DATABASES > > > > This has been discussed before, and rejected before. Please see > > archives. > > Many years ago. I think it's worth revisiting now in light of the number > of people now joining the PostgreSQL community and the greater > prevalence other ways of doing it. The world has changed, we have not. > > I'm not proposing any change in function, just a simpler syntax to allow > the above information to be available, for newbies. > > Just for the record, I've never ever met anyone that said "Oh, this \d > syntax makes so much sense. I'm a real convert to Postgres now you've > shown me this". The reaction is always the opposite one; always > negative. Which detracts from our efforts elsewhere. I have to agree with Simon here. \d is ridiculous for the common user. SHOW TABLES, SHOW COLUMNS makes a lot of sense. Just has something like DESCRIBE TABLE foo makes a lot more sense than \d. Sincerely, Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering -- 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: "Joshua D. Drake" on 15 Jul 2010 11:50 On Thu, 2010-07-15 at 17:38 +0200, Magnus Hagander wrote: > > Looks like the last time this was discussed, there wasn't any clear > > conclusion. Someone created a patch and it's still on the TODO list: > > http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php > > That one is about: > a) doing it in psql., not the backend > b) not actually implementing the command, but implementing hints for > the user telling them which is the correct command > > Is there an actual common use-case for having these commands available > for *non-psql* interfaces? Yes. We should provide a single, well described grammar for interacting with objects in the database regardless of client. I should be able to open ANY SQL terminal, and type SHOW ME THE MONEY and have Benjamins fall out. (O.k. I will take Euros too). JD -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering -- 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: Andrew Dunstan on 15 Jul 2010 11:52 Thom Brown wrote: > > Looks like the last time this was discussed, there wasn't any clear > conclusion. Someone created a patch and it's still on the TODO list: > http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php > > > This is not at all what Simon proposed. He wants to make it a backend command, not a psql command. I don't have a horse in the race, particularly. If we really want more utility commands, my preference would be to concentrate on those that are hard rather than those that could be easily done, e.g. a command that would give you the SQL necessary to create a given object. cheers andrew -- 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: Guillaume Lelarge on 15 Jul 2010 12:02 Le 15/07/2010 17:48, Joshua D. Drake a écrit : > On Thu, 2010-07-15 at 16:20 +0100, Simon Riggs wrote: >> On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote: >>> Simon Riggs <simon(a)2ndQuadrant.com> writes: >>>> The biggest turn off that most people experience when using PostgreSQL >>>> is that psql does not support memorable commands. >>> >>>> I would like to implement the following commands as SQL, allowing them >>>> to be used from any interface. >>> >>>> SHOW TABLES >>>> SHOW COLUMNS >>>> SHOW DATABASES >>> >>> This has been discussed before, and rejected before. Please see >>> archives. >> >> Many years ago. I think it's worth revisiting now in light of the number >> of people now joining the PostgreSQL community and the greater >> prevalence other ways of doing it. The world has changed, we have not. >> >> I'm not proposing any change in function, just a simpler syntax to allow >> the above information to be available, for newbies. >> >> Just for the record, I've never ever met anyone that said "Oh, this \d >> syntax makes so much sense. I'm a real convert to Postgres now you've >> shown me this". The reaction is always the opposite one; always >> negative. Which detracts from our efforts elsewhere. > > I have to agree with Simon here. \d is ridiculous for the common user. > > SHOW TABLES, SHOW COLUMNS makes a lot of sense. Just has something like > DESCRIBE TABLE foo makes a lot more sense than \d. > And would you add the complete syntax? I mean: SHOW [OPEN] TABLES [FROM db_name] [LIKE 'pattern'] I'm wondering what one can do with the [FROM db_name] clause :) -- Guillaume http://www.postgresql.fr http://dalibo.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: Thom Brown on 15 Jul 2010 12:03
On 15 July 2010 16:52, Andrew Dunstan <andrew(a)dunslane.net> wrote: > > > Thom Brown wrote: >> >> Looks like the last time this was discussed, there wasn't any clear >> conclusion. �Someone created a patch and it's still on the TODO list: >> http://archives.postgresql.org/pgsql-hackers/2010-01/msg01845.php >> >> >> > > This is not at all what Simon proposed. He wants to make it a backend > command, not a psql command. > My bad. But I find the following slightly odd: "The biggest turn off that most people experience when using PostgreSQL is that psql does not support memorable commands. I would like to implement the following commands as SQL, allowing them to be used from any interface." If it's only a psql problem, why implement it as SQL? Is it just so we're not adding keywords specifically to psql? In that case, it shouldn't support QUIT. But I agree with the principal of improving usability. There's the issue of schema with SHOW TABLES though. It would either have to show tables and their associated schema in separate columns, or have an extended "SHOW TABLES IN [SCHEMA] my_schema" syntax. I personally think LIST <object type> makes more sense, although I guess the point is that SHOW would be familiar to MySQL defectors ;) Thom -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |