Index: doc/src/sgml/ref/psql-ref.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v
retrieving revision 1.183
diff -u -p -c -r1.183 psql-ref.sgml
*** doc/src/sgml/ref/psql-ref.sgml 1 Feb 2007 19:10:24 -0000 1.183
--- doc/src/sgml/ref/psql-ref.sgml 18 Feb 2007 17:51:27 -0000
*************** lo_import 152801
*** 1491,1501 ****
expanded (or x)
! Toggles between regular and expanded format. When expanded
! format is enabled, query results are displayed in two
! columns, with the column name on the left and the data on
! the right. This mode is useful if the data wouldn't fit on the
! screen in the normal horizontal
mode.
--- 1491,1504 ----
expanded (or x)
! You can specify an optional second argument, if it is provided it
! may be either on or off
! which will enable or disable expanded mode. If the second
! argument is not provided then we will toggle between regular and
! expanded format. When expanded format is enabled, query results
! are displayed in two columns, with the column name on the left and
! the data on the right. This mode is useful if the data wouldn't fit
! on the screen in the normal horizontal
mode.
*************** lo_import 152801
*** 1535,1542 ****
footer
! Toggles the display of the default footer (x
! rows).
--- 1538,1548 ----
footer
! You can specify an optional second argument, if it is provided it
! may be either on or off
! which will enable or disable display of the default footer
! (x rows). If the second argument is not
! provided then we will toggle between on and off.
*************** lo_import 152801
*** 1545,1553 ****
numericlocale
! Toggles the display of a locale-aware character to separate groups
! of digits to the left of the decimal marker. It also enables
! a locale-aware decimal marker.
--- 1551,1562 ----
numericlocale
! You can specify an optional second argument, if it is provided it
! may be either on or off
! which will enable or disable display of a locale-aware character
! to seperate groups of digits to the left of the decimal marker. If
! the second argument is not provided then we will toggle between
! on and off.
*************** lo_import 152801
*** 1566,1575 ****
tuples_only (or t)
! Toggles between tuples only and full display. Full display
! shows extra information such as column headers, titles, and
! various footers. In tuples only mode, only actual table data
! is shown.
--- 1575,1587 ----
tuples_only (or t)
! You can specify an optional second argument, if it is provided it
! may be either on or off
! which will enable or display the tuples only mode. If the
! second argument is not provided then we will toggle between tuples
! only and full display. Full display shows extra information such
! as column headers, titles, and various footers. In tuples only
! mode, only actual table data is shown.
*************** lo_import 152801
*** 1618,1624 ****
(psql> does not do a perfect job of estimating
when to use the pager.) \pset pager> turns the
pager on and off. Pager can also be set to always>,
! which causes the pager to be always used.
--- 1630,1639 ----
(psql> does not do a perfect job of estimating
when to use the pager.) \pset pager> turns the
pager on and off. Pager can also be set to always>,
! which causes the pager to be always used, or you can set the pager
! to on> which will enable the usage of the pager when
! appropriate, or you can set the pager to off> which
! will disable the pager.
Index: src/bin/psql/command.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/command.c,v
retrieving revision 1.177
diff -u -p -c -r1.177 command.c
*** src/bin/psql/command.c 5 Jan 2007 22:19:49 -0000 1.177
--- src/bin/psql/command.c 18 Feb 2007 17:51:28 -0000
*************** do_pset(const char *param, const char *v
*** 1501,1507 ****
/* set expanded/vertical mode */
else if (strcmp(param, "x") == 0 || strcmp(param, "expanded") == 0 || strcmp(param, "vertical") == 0)
{
! popt->topt.expanded = !popt->topt.expanded;
if (!quiet)
printf(popt->topt.expanded
? _("Expanded display is on.\n")
--- 1501,1510 ----
/* set expanded/vertical mode */
else if (strcmp(param, "x") == 0 || strcmp(param, "expanded") == 0 || strcmp(param, "vertical") == 0)
{
! if (value)
! popt->topt.expanded = ParseVariableBool(value);
! else
! popt->topt.expanded = !popt->topt.expanded;
if (!quiet)
printf(popt->topt.expanded
? _("Expanded display is on.\n")
*************** do_pset(const char *param, const char *v
*** 1511,1517 ****
/* locale-aware numeric output */
else if (strcmp(param, "numericlocale") == 0)
{
! popt->topt.numericLocale = !popt->topt.numericLocale;
if (!quiet)
{
if (popt->topt.numericLocale)
--- 1514,1523 ----
/* locale-aware numeric output */
else if (strcmp(param, "numericlocale") == 0)
{
! if (value)
! popt->topt.numericLocale = ParseVariableBool(value);
! else
! popt->topt.numericLocale = !popt->topt.numericLocale;
if (!quiet)
{
if (popt->topt.numericLocale)
*************** do_pset(const char *param, const char *v
*** 1565,1571 ****
/* toggle between full and tuples-only format */
else if (strcmp(param, "t") == 0 || strcmp(param, "tuples_only") == 0)
{
! popt->topt.tuples_only = !popt->topt.tuples_only;
if (!quiet)
{
if (popt->topt.tuples_only)
--- 1571,1580 ----
/* toggle between full and tuples-only format */
else if (strcmp(param, "t") == 0 || strcmp(param, "tuples_only") == 0)
{
! if (value)
! popt->topt.tuples_only = ParseVariableBool(value);
! else
! popt->topt.tuples_only = !popt->topt.tuples_only;
if (!quiet)
{
if (popt->topt.tuples_only)
*************** do_pset(const char *param, const char *v
*** 1616,1621 ****
--- 1625,1635 ----
{
if (value && pg_strcasecmp(value, "always") == 0)
popt->topt.pager = 2;
+ else if (value)
+ if (ParseVariableBool(value))
+ popt->topt.pager = 1;
+ else
+ popt->topt.pager = 0;
else if (popt->topt.pager == 1)
popt->topt.pager = 0;
else
*************** do_pset(const char *param, const char *v
*** 1634,1640 ****
/* disable "(x rows)" footer */
else if (strcmp(param, "footer") == 0)
{
! popt->default_footer = !popt->default_footer;
if (!quiet)
{
if (popt->default_footer)
--- 1648,1657 ----
/* disable "(x rows)" footer */
else if (strcmp(param, "footer") == 0)
{
! if (value)
! popt->default_footer = ParseVariableBool(value);
! else
! popt->default_footer = !popt->default_footer;
if (!quiet)
{
if (popt->default_footer)