Re: show all; - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: show all; |
Date | |
Msg-id | 200106012018.f51KIso26895@candle.pha.pa.us Whole thread Raw |
In response to | show all; (Marko Kreen <marko@l-t.ee>) |
Responses |
Re: show all;
|
List | pgsql-patches |
Care to add RESET ALL? > > 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); > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
pgsql-patches by date: