From: | Marko Kreen <marko(at)l-t(dot)ee> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | show all; |
Date: | 2001-06-01 20:09:39 |
Message-ID: | 20010601220939.A27062@l-t.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg젠 토토SQL : |
As SHOW is for humans anyway, I hacked SHOW ALL that
shows all current session variables. More info with less
typing.
I have not looked if the doc changes look sane, because
I have not sgml tools on my machine ATM.
--
marko
Index: doc/src/sgml/ref/show.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v
retrieving revision 1.11
diff -c -r1.11 show.sgml
*** doc/src/sgml/ref/show.sgml 2000/12/25 23:15:26 1.11
--- doc/src/sgml/ref/show.sgml 2001/06/01 19:58:59
***************
*** 16,21 ****
--- 16,24 ----
<synopsis>
SHOW <replaceable class="PARAMETER">name</replaceable>
</synopsis>
+ <synopsis>
+ SHOW ALL
+ </synopsis>
<refsect2 id="R2-SQL-SHOW-1">
<title>Inputs</title>
***************
*** 29,34 ****
--- 32,43 ----
The name of a run-time parameter. See
<xref linkend="sql-set" endterm="sql-set-title">
for a list.
+ </para>
+ </listitem>
+ <term>ALL</term>
+ <listitem>
+ <para>
+ Show all current session parameters.
</para>
</listitem>
</varlistentry>
Index: src/backend/commands/variable.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/commands/variable.c,v
retrieving revision 1.48
diff -c -r1.48 variable.c
*** src/backend/commands/variable.c 2001/05/08 21:06:42 1.48
--- src/backend/commands/variable.c 2001/06/01 19:59:01
***************
*** 748,754 ****
show_server_encoding();
else if (strcasecmp(name, "seed") == 0)
show_random_seed();
! else
{
const char *val = GetConfigOption(name);
--- 748,763 ----
show_server_encoding();
else if (strcasecmp(name, "seed") == 0)
show_random_seed();
! else if (strcasecmp(name, "all") == 0)
! {
! show_date();
! show_timezone();
! show_DefaultXactIsoLevel();
! show_XactIsoLevel();
! show_client_encoding();
! show_server_encoding();
! show_random_seed();
! } else
{
const char *val = GetConfigOption(name);
Index: src/backend/parser/gram.y
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/parser/gram.y,v
retrieving revision 2.227
diff -c -r2.227 gram.y
*** src/backend/parser/gram.y 2001/05/27 09:59:29 2.227
--- src/backend/parser/gram.y 2001/06/01 19:59:14
***************
*** 860,865 ****
--- 860,871 ----
n->name = "timezone";
$$ = (Node *) n;
}
+ | SHOW ALL
+ {
+ VariableShowStmt *n = makeNode(VariableShowStmt);
+ n->name = "all";
+ $$ = (Node *) n;
+ }
| SHOW TRANSACTION ISOLATION LEVEL
{
VariableShowStmt *n = makeNode(VariableShowStmt);
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-06-01 20:18:54 | Re: show all; |
Previous Message | Marko Kreen | 2001-06-01 19:52:42 | unary plus |