Re: SHOW TABLES

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Rob Wultsch <wultsch(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Bernd Helmle <mailings(at)oopsware(dot)de>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SHOW TABLES
Date: 2010-07-17 22:16:17
Message-ID: 1279404977.3623.68.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 Frost<sfrost(at)snowman(dot)net> wrote:
> >> * Robert Haas (robertmhaas(at)gmail(dot)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".
> >
> > I don't think that "terse" and "powerful" are the same thing. One of my beefs with the backslash commands is that the syntax is not cleanly extensible. We have S and + as postfix modifiers, and that's fairly comprehensible, but as soon as you think about going much further with it, it starts to seem like alphabet soup.
> >
> > In fact, we're pretty close to alphabet soup already. Without looking at the help, what does \db do? What are the commands to list casts, conversions, and comments, respectively? What syntax would you propose for a backslash command to list comments, but only those on a certain object type? If you don't think we should have a backslash command for that, can you write an SQL query that lists comments on built-in aggregates in less than two minutes? How many people do you think can do it at all?
> >
> > I think "LIST COMMENTS ON SYSTEM AGGREGATES" would be an epic step forward in usability.
>
>
> uh oh - that actually sounds like a big step backwards to me - it's
> inventing extremely verbose pseudo english syntax for something that we
> currently do with a trivial and easy to remember backslash command.

By whose estimation?

I hate the backslash commands and I have been using them longer than
most.

I do agree that the above is a bit verbose but it is also blatant as to
what it is.

> Do we really need to invent a completely new language for this?
> Once you extend that syntax to what you are proposing (ie provide a way
> to filter like "LIST COMMENTS ON SYSTEM AGGREGATES WITH NUMERIC INPUT")
> you basically reinvented a query language - ever heard of SQL or QUEL?

Really? Hmmm....

SELECT * FROM (where are system aggregates again?), oh right, pg_proc,
what is the column that tells me it is a system aggregate? -- Do I
filter by namespace?

Oh, crimey, why can't I just type:

SHOW COMMENTS ON SYSTEM AGGREGATES (or LIST)

JD

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2010-07-18 00:24:20 Re: Review: Row-level Locks & SERIALIZABLE transactions, postgres vs. Oracle
Previous Message Stefan Kaltenbrunner 2010-07-17 21:30:45 Re: SHOW TABLES