Re: [HACKERS] Are we losing momentum?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Sean Chittenden <sean(at)chittenden(dot)org>, 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-05-31 16:49:00
Message-ID: 20930.1054399740@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general pgsql-hackers pgsql-patches

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Bruce Momjian writes:
>> Where do we want to go with this? It is interesting that it maps MySQL
>> SHOW commands on top of our existing SHOW syntax in psql. The patch
>> doesn't look too big.

> The response to "Are we losing momentum?" isn't to add redundant syntax
> for nonstandard features that we have no control over.

I'm of two minds about it myself. I don't like trying to play follow-the-
leader with a moving target. But if you think of it as trying to win
over converts from MySQL, it seems a lot more palatable.

It would also be interesting to combine this with Rod's idea of driving
describe-type queries by table instead of hardwired code. Imagine that
the backend's "show foo" command first looks for "foo" as a GUC
variable, as it does now, but upon failing to find one it looks in a
system table for a query associated with the name "foo". If it finds
such a query, it runs it and sends back the result. Now, not only can
we emulate "show tables", but people can easily add application-specific
"show whatever" commands, which seems tremendously cool.

There are some safety and protection issues to be solved here (probably
only superusers should be allowed to modify the query table, and we
should restrict the form of the query to be a single SELECT command)
but I can't think of any showstoppers. Now that we've abandoned backend
autocommit there are no technical reasons that SHOW shouldn't be allowed
to run a SELECT query.

I did not care for the original patch (which IIRC made psql recognize
"show" commands, rather than doing it in the backend) but something like
the above seems reasonably clean.

regards, tom lane

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message PeterKorman 2003-05-31 19:19:03 Re: Slashdot: SAP and MySQL Join Forces
Previous Message Peter Eisentraut 2003-05-31 15:55:16 Re: [HACKERS] Are we losing momentum?

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-05-31 17:51:03 Re: default locale considered harmful? (was Re: [GENERAL]
Previous Message Peter Eisentraut 2003-05-31 15:55:16 Re: [HACKERS] Are we losing momentum?

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-05-31 17:51:03 Re: default locale considered harmful? (was Re: [GENERAL]
Previous Message Tom Lane 2003-05-31 16:05:30 Re: A few notes

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2003-05-31 21:40:15 array support phase 3 patch (was Re: array support patch phase 1 patch)
Previous Message Peter Eisentraut 2003-05-31 15:55:16 Re: [HACKERS] Are we losing momentum?