Re: [HACKERS] Are we losing momentum?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Curt Sampson <cjs(at)cynic(dot)net>, Brent Verner <brent(at)rcfile(dot)org>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Are we losing momentum?
Date: 2003-04-17 21:40:47
Message-ID: 21857.1050615647@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general pgsql-hackers pgsql-patches

Sean Chittenden <sean(at)chittenden(dot)org> writes:
>> Keep in mind though that there was already talk of migrating most of
>> the \d functionality to the backend (primarily as a way of
>> decoupling psql from catalog version changes). If we were to do
>> that, it would make good sense to make it accessible via SHOW as
>> well. IMHO anyway.

> :-/ Yeah, I've been following that from a distance and I'm not so wild
> about that. I really like that the information_schema has been
> integrated into the base, but translating the SHOW commands into
> SELECTs from information_schema on the backend seems like a bad idea
> unless its going to be done abstract enough via some kind of rewrite
> engine that allows users to program the database to translate their
> verbiage into SQL (ex: KILL -> DROP, GET -> SELECT), which could be
> kinda fun.

Well, I don't want to convert \d into selects from information_schema,
primarily because that would constrain us to showing only things that
are known to the SQL spec --- goodbye, Postgres-specific features
(such as user-definable operators).

I was, however, wondering whether the backend internal support for
"SHOW tables" couldn't be simply to translate it to "SELECT * FROM
some_view". Then it'd be possible for people to customize the output by
replacing the view definition.

> Getting back to SHOW, what do you want to show or not show? Does the
> backend show what's most user friendly? If that's the case, do you
> only show tables that a user has SELECT access to? Does SHOW return
> tuples like a SELECT? What if a SHOW statement doesn't show what the
> user is interested in (view definitions)?

I thought you only wanted MySQL-equivalent functionality here ;-).
Don't tell me they have customizable SHOW output ...

> The information_schema.* tables/views are the SQL sanctioned interface
> that the backend provides.

This argument sounds great in the abstract, but it falls down as soon as
you consider the reality that we want to support things that aren't
SQL-sanctioned. Now, we could define some views that are *not* exactly
INFORMATION_SCHEMA, but at that point the claim that it's a stable
standard interface is looking a lot weaker :-(

regards, tom lane

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Sean Chittenden 2003-04-17 21:55:31 Re: [HACKERS] Are we losing momentum?
Previous Message Rod Taylor 2003-04-17 21:25:15 Re: [HACKERS] Are we losing momentum?

Browse pgsql-general by date

  From Date Subject
Next Message Sean Chittenden 2003-04-17 21:55:31 Re: [HACKERS] Are we losing momentum?
Previous Message Rod Taylor 2003-04-17 21:25:15 Re: [HACKERS] Are we losing momentum?

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2003-04-17 21:55:31 Re: [HACKERS] Are we losing momentum?
Previous Message Rod Taylor 2003-04-17 21:25:15 Re: [HACKERS] Are we losing momentum?

Browse pgsql-patches by date

  From Date Subject
Next Message Sean Chittenden 2003-04-17 21:55:31 Re: [HACKERS] Are we losing momentum?
Previous Message Rod Taylor 2003-04-17 21:25:15 Re: [HACKERS] Are we losing momentum?