Re: [HACKERS] SHOW TABLES

2010-09-21 Thread Boszormenyi Zoltan
Guillaume Lelarge írta: 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 si...@2ndquadrant.com writes: The biggest turn off that most people

Re: [HACKERS] SHOW TABLES

2010-09-21 Thread Robert Haas
On Tue, Sep 21, 2010 at 4:52 AM, Boszormenyi Zoltan z...@cybertec.at wrote: I think it's related to making this work:    SELECT * FROM db.schema.table; Which is a non-starter, I think. Every function in the system that thinks an OID uniquely identifies a database object would need to modified,

Re: [HACKERS] SHOW TABLES

2010-08-09 Thread Bruce Momjian
Robert Haas wrote: On Sat, Jul 17, 2010 at 11:14 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: I'd like to be able to list comments on objects of a particular type. And, yeah, I'd like to be able to list all the aggregates that take a numeric argument, or all the functions

Re: [HACKERS] SHOW TABLES

2010-08-09 Thread Simon Riggs
On Mon, 2010-08-09 at 17:42 -0400, Bruce Momjian wrote: Robert Haas wrote: On Sat, Jul 17, 2010 at 11:14 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: I'd like to be able to list comments on objects of a particular type. And, yeah, I'd like to be able to list all the

Re: [HACKERS] SHOW TABLES

2010-08-09 Thread Robert Haas
On Mon, Aug 9, 2010 at 5:42 PM, Bruce Momjian br...@momjian.us wrote: Sorry for the late reply.  If we are going to end up recreating SQL, we might as well just keep the backslash mess we have, or tell them to use SQL for the complex queries.  My point was that we might find that what we cook

Re: [HACKERS] SHOW TABLES

2010-08-09 Thread Bruce Momjian
Kevin Grittner wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: On 07/18/2010 08:58 PM, Andres Freund wrote: I am quite a bit surprised about all this discussion. I have a very hard time we will find anything people agree about and can remember well enough to be usefull for

Re: [HACKERS] SHOW TABLES

2010-08-09 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: Kevin Grittner wrote: I can't picture anything which could be done with views which would allow me to issue one statement and see everything of interest about a table (etc.). You know: tablespace, owner, permissions, columns, primary key, foreign keys,

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 1. \d isn't exactly the most intuitive thing ever Seems fairly mnemomic to me (d=describe) and it packs a *lot* of information into a single letter (see below). Things that are done often should have short keystrokes, and not require

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Robert Haas (robertmh...@gmail.com) wrote: I think LIST COMMENTS ON SYSTEM AGGREGATES would be an epic step forward in usability. Perhaps. But it would behoove you to come up with a less er... arcane example. I've been using Postgres a long

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Kevin Grittner wrote: Any solution which only works within psql isn't a solution for a large part of the problem space people are trying to address. One important goal is that if someone spends a day to whip up a GUI query tool (as I did

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Kevin Grittner
Stephen Frost sfr...@snowman.net wrote: You think that the users of the libpq() interface (or even the protocol itself) are going to handle getting \dt-type output back somehow..? If you look back in the thread, you'll see that I admitted my ignorance of whether this could be properly

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Stephen Frost
* Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: I know, though, that the JDBC spec supports such things -- you can keep pulling ResultSet objects off the wire, each with its own distinct set of columns. (That is, each ResultSet has its own ResultSetMetaData which specifies how many

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Robert Haas
On Mon, Jul 19, 2010 at 10:25 AM, Greg Sabino Mullane g...@turnstep.com wrote: in the alphabet soup paragraph above.  I don't think there's anything WRONG with letting \dFp show text search dictionaries and \dfwS+ list system window functions with additional detail - but I'd like an

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread David Fetter
On Mon, Jul 19, 2010 at 02:12:19PM -, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 1. \d isn't exactly the most intuitive thing ever Seems fairly mnemomic to me (d=describe) and it packs a *lot* of information into a single letter (see below).

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Joshua D. Drake
On Mon, 2010-07-19 at 10:23 -0700, David Fetter wrote: On Mon, Jul 19, 2010 at 02:12:19PM -, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 1. \d isn't exactly the most intuitive thing ever Seems fairly mnemomic to me (d=describe) and it

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 David Fetter wrote: No arguments there, but that's the nature of the beast. I don't think it's as bad as is made out, however, as \d covers 99% of everyday usage and certainly the show tables that started this thread. It covers 0% of

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread David Fetter
On Mon, Jul 19, 2010 at 09:31:06AM -0500, Kevin Grittner wrote: Stephen Frost sfr...@snowman.net wrote: You think that the users of the libpq() interface (or even the protocol itself) are going to handle getting \dt-type output back somehow..? If you look back in the thread, you'll

Re: [HACKERS] SHOW TABLES

2010-07-19 Thread Kevin Grittner
David Fetter da...@fetter.org wrote: Would something like this do? Thanks to Andrew Gierth for helping me figure out how to get this working :) CREATE OR REPLACE FUNCTION multi_result() RETURNS SETOF REFCURSOR With appropriate tweaks to JDBC and the other drivers, this would cover a lot

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Dimitri Fontaine
Hi, Le 18 juil. 2010 à 05:41, Robert Haas a écrit : On Sat, Jul 17, 2010 at 11:14 PM, Bruce Momjian br...@momjian.us wrote: I am concerned that implementing a command syntax to show complex output like above effectively means re-implementing a subset of SQL, and that subset will never be as

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Andres Freund
On Sunday 18 July 2010 20:39:07 Dimitri Fontaine wrote: SHOW ANY TABLE GROUP BY tablename HAVING array_agg(attributes) @ array['date'::regtype, 'time'::regtype]; Why is that in *any* way better than SELECT * FROM meta.tables ... Oh. The second looks like something I know. Oh. My editor

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Kevin Grittner
Dimitri Fontaine dfonta...@hi-media.com wrote: So what we'd need first is a series of named queries, which I think psql provides for. Any solution which only works within psql isn't a solution for a large part of the problem space people are trying to address. One important goal is that if

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Rob Wultsch
On Sun, Jul 18, 2010 at 11:58 AM, Andres Freund and...@anarazel.de wrote: On Sunday 18 July 2010 20:39:07 Dimitri Fontaine wrote: SHOW ANY TABLE GROUP BY tablename   HAVING array_agg(attributes) @ array['date'::regtype, 'time'::regtype]; Why is that in *any* way better than SELECT * FROM

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Stefan Kaltenbrunner
On 07/18/2010 08:58 PM, Andres Freund wrote: On Sunday 18 July 2010 20:39:07 Dimitri Fontaine wrote: SHOW ANY TABLE GROUP BY tablename HAVING array_agg(attributes) @ array['date'::regtype, 'time'::regtype]; Why is that in *any* way better than SELECT * FROM meta.tables ... Oh. The second

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Andres Freund
Hi, On Sunday 18 July 2010 21:02:59 Rob Wultsch wrote: On Sun, Jul 18, 2010 at 11:58 AM, Andres Freund and...@anarazel.de wrote: On Sunday 18 July 2010 20:39:07 Dimitri Fontaine wrote: SHOW ANY TABLE GROUP BY tablename HAVING array_agg(attributes) @ array['date'::regtype,

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Kevin Grittner
Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: On 07/18/2010 08:58 PM, Andres Freund wrote: I am quite a bit surprised about all this discussion. I have a very hard time we will find anything people agree about and can remember well enough to be usefull for both manual and automatic

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Dimitri Fontaine
Le 18 juil. 2010 à 21:00, Kevin Grittner a écrit : Dimitri Fontaine dfonta...@hi-media.com wrote: So what we'd need first is a series of named queries, which I think psql provides for. Any solution which only works within psql isn't a solution for a large part of the problem space people

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Dimitri Fontaine
Le 18 juil. 2010 à 20:58, Andres Freund a écrit : On Sunday 18 July 2010 20:39:07 Dimitri Fontaine wrote: SHOW ANY TABLE GROUP BY tablename HAVING array_agg(attributes) @ array['date'::regtype, 'time'::regtype]; Why is that in *any* way better than SELECT * FROM meta.tables ... There

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Dimitri Fontaine
Le 18 juil. 2010 à 21:21, Andres Freund a écrit : Providing an easy wrapper is something I could agree without much problems (as it doesnt touch me). But starting several new toplevel commands which do not give everything (i.e. the ability to selectively use columns) but still want to

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Simon Riggs
On Sun, 2010-07-18 at 20:39 +0200, Dimitri Fontaine wrote: SHOW TABLE foo; Yes SHOW TABLES WHERE tablename ~ 'foo'; SHOW ANY TABLE GROUP BY tablename HAVING array_agg(attributes) @ array['date'::regtype, 'time'::regtype]; For me, realistically, No. Simplifying SQL should be left

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Stefan Kaltenbrunner
On 07/18/2010 09:00 PM, Kevin Grittner wrote: Dimitri Fontainedfonta...@hi-media.com wrote: So what we'd need first is a series of named queries, which I think psql provides for. Any solution which only works within psql isn't a solution for a large part of the problem space people are

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Andres Freund
Hi Kevin, On Sunday 18 July 2010 21:24:25 Kevin Grittner wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: On 07/18/2010 08:58 PM, Andres Freund wrote: I am quite a bit surprised about all this discussion. I have a very hard time we will find anything people agree about and can

Re: [HACKERS] SHOW TABLES

2010-07-18 Thread Stephen Frost
Kevin, * Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: I can't picture anything which could be done with views which would allow me to issue one statement and see everything of interest about a table (etc.). You know: tablespace, owner, permissions, columns, primary key, foreign keys,

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Robert Haas
On Jul 16, 2010, at 11:02 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot of information in a character- something which is next to

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Kevin Grittner
Tim Landscheidt t...@tim-landscheidt.de wrote: One major flaw I see is that the fractional precision is fixed. Not only petrol stations split cents. Well, I've never paid a petrol station a fraction of a cent; I've only seen *rates* of money per some unit of measure with fractional cents.

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Joshua D. Drake
On Sat, 2010-07-17 at 09:02 -0500, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Pavel Stehule
2010/7/17 Joshua D. Drake j...@commandprompt.com: On Sat, 2010-07-17 at 09:02 -0500, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Stefan Kaltenbrunner
On 07/17/2010 04:02 PM, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frostsfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot of information

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Joshua D. Drake
On Sat, 2010-07-17 at 23:30 +0200, Stefan Kaltenbrunner wrote: On 07/17/2010 04:02 PM, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frostsfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Robert Haas
On Sat, Jul 17, 2010 at 5:30 PM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: On 07/17/2010 04:02 PM, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frostsfr...@snowman.net  wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Bruce Momjian
Robert Haas wrote: I'd like to be able to list comments on objects of a particular type. And, yeah, I'd like to be able to list all the aggregates that take a numeric argument, or all the functions that take, say, an argument of type internal. Right now, this is an ENORMOUS pain in the neck.

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Robert Haas
On Sat, Jul 17, 2010 at 11:14 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: I'd like to be able to list comments on objects of a particular type. And, yeah, I'd like to be able to list all the aggregates that take a numeric argument, or all the functions that take, say, an

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Simon Riggs
On Thu, 2010-07-15 at 21:57 -0400, Robert Haas wrote: Exactly which commands are we going to support? With exactly what syntax? What information will be returned by each command? In what format? We have no agreement on any of these points. The normal process is that we discuss the

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Hans-Jürgen Schönig
On Jul 15, 2010, at 6:43 PM, Magnus Hagander wrote: On Thu, Jul 15, 2010 at 18:35, Simon Riggs si...@2ndquadrant.com wrote: 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

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Robert Haas
On Jul 15, 2010, at 11:18 PM, Josh Berkus j...@agliodbs.com wrote: I think it's very important, as Haas says, to consider that whatever we do in this arena, we'll be living with it forever, so let's not make the \dv vs. \df mistake again, ok? Refresh my memory? ...Robert -- Sent via

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Markus Wanner
I have to agree with Simon here. \d is ridiculous for the common user. +1 Regards Markus -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
Andrew Dunstan wrote: Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what non-psql interactive terminal programs are there? I think your assumption is

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
Bruce Momjian wrote: Andrew Dunstan wrote: Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what non-psql interactive terminal programs are there?

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Pavel Stehule
2010/7/16 Bruce Momjian br...@momjian.us: Andrew Dunstan wrote: Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what non-psql interactive terminal programs are there?

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Thom Brown
On 16 July 2010 13:49, Bruce Momjian br...@momjian.us wrote: Bruce Momjian wrote: Andrew Dunstan wrote: Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Simon Riggs
On Fri, 2010-07-16 at 14:07 +0100, Thom Brown wrote: The problem is people are stating different requirements. - to make it easy for new users of psql - to simplify fetching basic database information from any client application - to ease transition between MySQL and PostgreSQL Close, but

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Steve Atkins
On Jul 16, 2010, at 8:11 AM, Simon Riggs wrote: On Fri, 2010-07-16 at 14:07 +0100, Thom Brown wrote: The problem is people are stating different requirements. - to make it easy for new users of psql - to simplify fetching basic database information from any client application - to ease

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Simon Riggs
On Thu, 2010-07-15 at 15:38 -0400, Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what non-psql interactive terminal programs are there? My original thought was around the

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
Simon Riggs wrote: On Thu, 2010-07-15 at 15:38 -0400, Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what non-psql interactive terminal programs are there? My

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread David Fetter
On Fri, Jul 16, 2010 at 11:44:58AM -0400, Bruce Momjian wrote: Simon Riggs wrote: On Thu, 2010-07-15 at 15:38 -0400, Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Marc G. Fournier
On Fri, 16 Jul 2010, Bruce Momjian wrote: There are many tools that can access Postgres. Some are libpq programs, though there are command line versions in every environment: java, python, etc.. Yeah, but do enough people use them to warrant putting this in the backend? I may have lost the

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
Marc G. Fournier wrote: On Fri, 16 Jul 2010, Bruce Momjian wrote: There are many tools that can access Postgres. Some are libpq programs, though there are command line versions in every environment: java, python, etc.. Yeah, but do enough people use them to warrant putting this in the

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread David Fetter
On Fri, Jul 16, 2010 at 12:04:01PM -0400, Bruce Momjian wrote: Marc G. Fournier wrote: On Fri, 16 Jul 2010, Bruce Momjian wrote: There are many tools that can access Postgres. Some are libpq programs, though there are command line versions in every environment: java, python, etc..

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread David E. Wheeler
On Jul 16, 2010, at 9:09 AM, David Fetter wrote: Clarification, do enough people use non-psql command line tools to warrant putting this in the backend? Yes. Such backend stuff is in every RDBMS except ours. I admit that I had to do a *lot* of work to write the schema-testing functions

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
David Fetter wrote: On Fri, Jul 16, 2010 at 12:04:01PM -0400, Bruce Momjian wrote: Marc G. Fournier wrote: On Fri, 16 Jul 2010, Bruce Momjian wrote: There are many tools that can access Postgres. Some are libpq programs, though there are command line versions in every

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Simon Riggs
On Fri, 2010-07-16 at 12:16 -0400, Bruce Momjian wrote: Really? What are the other syntaxes? SHOW TABLES -- Simon Riggs www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Training and Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Aidan Van Dyk
* Simon Riggs si...@2ndquadrant.com [100716 12:24]: On Fri, 2010-07-16 at 12:16 -0400, Bruce Momjian wrote: Really? What are the other syntaxes? SHOW TABLES Obviously, only for some $value of $other... The 3 database I have access to: [DataDirect][ODBC SQL Server Driver][SQL

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
Simon Riggs wrote: On Fri, 2010-07-16 at 12:16 -0400, Bruce Momjian wrote: Really? What are the other syntaxes? SHOW TABLES That is MySQL? Do does every other RDBMs also use that, as David suggested? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: What are the other syntaxes? For Sybase ASE sp_help and other stored procedures, see: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36273.1550/html/sprocs/X85190.htm Like \d, these server-side stored procedures can return

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Simon Riggs
On Fri, 2010-07-16 at 12:25 -0400, Bruce Momjian wrote: Simon Riggs wrote: On Fri, 2010-07-16 at 12:16 -0400, Bruce Momjian wrote: Really? What are the other syntaxes? SHOW TABLES That is MySQL? Do does every other RDBMs also use that, as David suggested? He didn't say it was

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Robert Haas
On Jul 16, 2010, at 7:43 AM, Bruce Momjian br...@momjian.us wrote: Andrew Dunstan wrote: Bruce Momjian wrote: I assume SHOW TABLES would only be useful for interactive terminal sesssions, not for application code (which should use information_schema), so what non-psql interactive terminal

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Rob Wultsch
On Fri, Jul 16, 2010 at 9:56 AM, Robert Haas robertmh...@gmail.com wrote: For committers. Perhaps this discussions should be moved to the General list in order to poll the userbase. My .02 is that SHOW commands (even if they are not compatible) would make it much easier for me to make an

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Marc G. Fournier
On Fri, 16 Jul 2010, Simon Riggs wrote: SQLServer and Sybase use sp_ procedures for this Haven't experienced Sybase for 2 years in my last job, I can tell you that the sp_* commands are definitely non-intuitive :( Marc G. FournierHub.Org Hosting Solutions S.A.

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Chris Browne
si...@2ndquadrant.com (Simon Riggs) writes: 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

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Kevin Grittner
Marc G. Fournier scra...@hub.org wrote: Haven't experienced Sybase for 2 years in my last job, I can tell you that the sp_* commands are definitely non-intuitive :( In general, I'd agree; although I think I got used to them about as fast as the PostgreSQL backslash commands. In the

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Bruce Momjian
Chris Browne wrote: - I'd sure like to be able to write queries that *don't* involve array smashing or using grep on \z output to analyze object permissions. The \z output is an embarrassment, no question about it in my mind. -- Bruce Momjian br...@momjian.us

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Heikki Linnakangas
On 16/07/10 20:11, Rob Wultsch wrote: On Fri, Jul 16, 2010 at 9:56 AM, Robert Haasrobertmh...@gmail.com wrote: For committers. Perhaps this discussions should be moved to the General list in order to poll the userbase. My .02 is that SHOW commands (even if they are not compatible) would

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Rob Wultsch
On Fri, Jul 16, 2010 at 10:52 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 16/07/10 20:11, Rob Wultsch wrote: On Fri, Jul 16, 2010 at 9:56 AM, Robert Haasrobertmh...@gmail.com  wrote: For committers. Perhaps this discussions should be moved to the General list in

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Simon Riggs
On Fri, 2010-07-16 at 20:52 +0300, Heikki Linnakangas wrote: On 16/07/10 20:11, Rob Wultsch wrote: On Fri, Jul 16, 2010 at 9:56 AM, Robert Haasrobertmh...@gmail.com wrote: For committers. Perhaps this discussions should be moved to the General list in order to poll the userbase. My

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Heikki Linnakangas
On 16/07/10 21:32, Simon Riggs wrote: On Fri, 2010-07-16 at 20:52 +0300, Heikki Linnakangas wrote: I have nothing against SHOW TABLES ...but SHOW wins, based on numbers of people expecting that I'm not sure I buy that, but even if it's true, it doesn't seem fair to do a favor to one group

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Tim Landscheidt
Simon Riggs si...@2ndquadrant.com wrote: [...] Light switches are usually at shoulder height next to a door. Our light switches are 2 metres up, on the far side of the room. People are sick of banging their knees on furniture while trying to grope for the light. The light switch isn't so

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Joshua D. Drake
On Fri, 2010-07-16 at 19:32 +0100, Simon Riggs wrote: That's a very sensible suggestion, we should give a hint for all common commands SHOW, LIST, etc., even though we pick just one to implement. That way we're not on the hook to maintain them forever, and we will be doing people a

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Brendan Jurd
On 17 July 2010 07:26, Joshua D. Drake j...@commandprompt.com wrote: 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.

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Joshua D. Drake
On Sat, 2010-07-17 at 07:36 +1000, Brendan Jurd wrote: On 17 July 2010 07:26, Joshua D. Drake j...@commandprompt.com wrote: 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,

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Stephen Frost
* Heikki Linnakangas (heikki.linnakan...@enterprisedb.com) wrote: I'm not sure I buy that, but even if it's true, it doesn't seem fair to do a favor to one group of users, leaving the rest stranded and excluded forever. Even if SHOW TABLES has a bigger mind-share than the others, surely

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Kevin Grittner
Joshua D. Drake j...@commandprompt.com wrote: On Sat, 2010-07-17 at 07:36 +1000, Brendan Jurd wrote: postgres=# SHOW ME THE MONEY; WARNING: THE MONEY is deprecated in this version of Postgres and may be discarded in a future version HINT: Use SHOW ME THE NUMERIC with the desired precision

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Dimitri Fontaine
Le 16 juil. 2010 à 18:42, Kevin Grittner a écrit : Like \d, these server-side stored procedures can return a number of result sets. Like Robert, I'm skeptical of implementing a server-side solution for PostgreSQL which doesn't do the same. I'm not clear on whether that's even possible

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Tim Landscheidt
Kevin Grittner kevin.gritt...@wicourts.gov wrote: postgres=# SHOW ME THE MONEY; WARNING: THE MONEY is deprecated in this version of Postgres and may be discarded in a future version HINT: Use SHOW ME THE NUMERIC with the desired precision instead. Funny, but no longer true:

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Robert Haas
On Fri, Jul 16, 2010 at 1:52 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: That's for MySQL. I come from a DB2 background, and when I started using psql years ago, I often typed LIST TABLES without thinking much about it. Not SHOW TABLES, but LIST TABLES. I bet Oracle

Re: [HACKERS] SHOW TABLES

2010-07-16 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot of information in a character- something which is next to impossible to do in english. Consider 'standard' perl vs. perl w/ 'use

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Tom Lane
Simon Riggs si...@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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Simon Riggs
On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote: Simon Riggs si...@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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Thom Brown
On 15 July 2010 16:20, Simon Riggs si...@2ndquadrant.com wrote: On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote: Simon Riggs si...@2ndquadrant.com writes: The biggest turn off that most people experience when using PostgreSQL is that psql does not support memorable commands. I would

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Hans-Jürgen Schönig
On Jul 15, 2010, at 5:20 PM, Simon Riggs wrote: On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote: Simon Riggs si...@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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Magnus Hagander
On Thu, Jul 15, 2010 at 17:30, Thom Brown thombr...@gmail.com wrote: On 15 July 2010 16:20, Simon Riggs si...@2ndquadrant.com wrote: On Thu, 2010-07-15 at 11:05 -0400, Tom Lane wrote: Simon Riggs si...@2ndquadrant.com writes: The biggest turn off that most people experience when using

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Joshua D. Drake
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 si...@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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Joshua D. Drake
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)

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Andrew Dunstan
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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Guillaume Lelarge
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 si...@2ndquadrant.com writes: The biggest turn off that most people experience when using PostgreSQL is that psql does not

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Thom Brown
On 15 July 2010 16:52, Andrew Dunstan and...@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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Joshua D. Drake
On Thu, 2010-07-15 at 18:02 +0200, Guillaume Lelarge wrote: 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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Aaron W. Swenson
As a common user -- probably a bit more than that now -- I'd have to say my reaction to '\d' instead of 'SHOW DATABASES;' was more of a meh moment for me. Furthermore, '\d' is much quick to type than 'SHOW DATABASES;', and much less likely to suffer typos. As for '\d' not being memorable: It

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Marc G. Fournier
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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Thom Brown
On 15 July 2010 17:07, Marc G. Fournier scra...@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

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Robert Haas
On Jul 15, 2010, at 10:50 AM, Joshua D. Drake j...@commandprompt.com 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:

Re: [HACKERS] SHOW TABLES

2010-07-15 Thread Marc G. Fournier
On Thu, 15 Jul 2010, Thom Brown wrote: On 15 July 2010 17:07, Marc G. Fournier scra...@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

  1   2   >