From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, peter_e(at)gmx(dot)net |
Subject: | Re: SHOW ALL as a query result |
Date: | 2002-04-03 03:44:24 |
Message-ID: | 3CAA7A98.8000807@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christopher Kings-Lynne wrote:
> Hi All,
>
> Now that Tom's modified the EXPLAIN output to appear as a query
> result, maybe SHOW and SHOW ALL should also be modified in that way.
> The current NOTICE: business is a bit messy, and it sure would
> assist projects just as pgAccess, phpPgAdmin and pgAdmin with
> displaying configuration!
>
> Also, what else could be usefully modified?
>
> Chris
>
> ps.
>
>
>>> BTW, see: ~/pgsql/src/backend/commands/explain.c for the new
>>> functions Tom Lane wrote which send explain results to the front
>>> end as if they were from a select statement. Very informative.
>>> Specifically see: begin_text_output(CommandDest dest, char
>>> *title); do_text_output(TextOutputState *tstate, char *aline);
>>> do_text_output_multiline(TextOutputState *tstate, char *text);
>>> end_text_output(TextOutputState *tstate);
I was also thinking about this, but the EXPLAIN approach is only useful
if you never want to select on the output. Another approach might be to
write a function, say show_all(), and then modify gram.y to make:
SHOW ALL;
- equivalent to -
SELECT show_all();
so that you could do:
SELECT show_var() FROM (SELECT show_all()) as s WHERE show_var_name()
LIKE 'wal%';
or something like that.
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-04-03 04:09:55 | Re: ANALYZE after restore |
Previous Message | Peter Eisentraut | 2002-04-03 03:01:16 | Re: SHOW ALL as a query result |