From: "Joshua D. Drake" on 15 Jul 2010 12:19 On Thu, 2010-07-15 at 13:16 -0300, Marc G. Fournier wrote: > > Isn't that what the information_schema catalog is for? > > I'd rather write: > > SHOW TABLES; > > then: > > SELECT table_name > FROM information_schema.tables > WHERE table_type = 'BASE TABLE' > AND table_schema NOT IN > ('pg_catalog', 'information_schema'); > > And, the latter, unless I'm doing it regularly, is alot harder to remember > then the former ... > Thank you Marc. That is an excellent description of the problem that is being ignored. We are no longer the academia database. We need to think of real users here. 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: Thom Brown on 15 Jul 2010 12:20 On 15 July 2010 17:16, Marc G. Fournier <scrappy(a)hub.org> wrote: > On Thu, 15 Jul 2010, Thom Brown wrote: > >> On 15 July 2010 17:07, Marc G. Fournier <scrappy(a)hub.org> wrote: >>> >>> On Thu, 15 Jul 2010, Thom Brown wrote: >>> >>>> 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. >>> >>> Personally, I think this is somethign that should go into the backend ... >>> I'd like to be able to write perl scripts that talk to the backend >>> without >>> having to remember all the various system tables I need to query / join >>> to >>> get the same results as \d gives me in psql ... same for any interface >>> language, really ... >>> >> >> Isn't that what the information_schema catalog is for? > > I'd rather write: > > SHOW TABLES; > > then: > > SELECT �table_name > �FROM information_schema.tables > �WHERE table_type = 'BASE TABLE' > � AND table_schema NOT IN > � � � ('pg_catalog', 'information_schema'); > > And, the latter, unless I'm doing it regularly, is alot harder to remember > then the former ... Yes, I see what you mean now. That would simplify things greatly. 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
From: David Fetter on 15 Jul 2010 12:30 On Thu, Jul 15, 2010 at 05:38:35PM +0200, Magnus Hagander wrote: > On Thu, Jul 15, 2010 at 17:30, Thom Brown <thombrown(a)gmail.com> wrote: > > On 15 July 2010 16:20, Simon Riggs <simon(a)2ndquadrant.com> 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. > >> > >> -- > > > > 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? In a word, YES! In two words, HELL, YES! Cheers, David. -- David Fetter <david(a)fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter(a)gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- 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 Fetter on 15 Jul 2010 12:31 On Thu, Jul 15, 2010 at 08:50:31AM -0700, Joshua D. Drake wrote: > 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. It's all about the Washingtons ;) Cheers, David. -- David Fetter <david(a)fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter(a)gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- 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: Simon Riggs on 15 Jul 2010 12:35
On Thu, 2010-07-15 at 17:38 +0200, Magnus Hagander wrote: > Is there an actual common use-case for having these commands available > for *non-psql* interfaces? There are many interfaces out there and people writing new ones everyday. We just wrote an interface for Android, for example. It is arguably *more* important to do this from non-psql interfaces. There should be one command to "display a list of tables" and it needs to be easily guessable for those who have forgotten. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |