pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Improve consistency of parsing of psql's magic variables.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Improve consistency of parsing of psql's magic variables.
@ 2014-12-31 17:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2014-12-31 17:19 UTC (permalink / raw)
  To: pgsql-committers

Improve consistency of parsing of psql's magic variables.

For simple boolean variables such as ON_ERROR_STOP, psql has for a long
time recognized variant spellings of "on" and "off" (such as "1"/"0"),
and it also made a point of warning you if you'd misspelled the setting.
But these conveniences did not exist for other keyword-valued variables.
In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
"off" as possible values, none of the alternative spellings for those were
recognized; and to make matters worse the code would just silently assume
"on" was meant for any unrecognized spelling.  Several people have reported
getting bitten by this, so let's fix it.  In detail, this patch:

* Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
and ON_ERROR_ROLLBACK.

* Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.

* Recognizes all values for all these variables case-insensitively;
previously there was a mishmash of case-sensitive and case-insensitive
behaviors.

Back-patch to all supported branches.  There is a small risk of breaking
existing scripts that were accidentally failing to malfunction; but the
consensus is that the chance of detecting real problems and preventing
future mistakes outweighs this.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/28551797a46c0ada035c34cf9cf2bc90448e3c26

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |   39 ++++++++++----------
src/bin/psql/command.c         |   18 ++++++----
src/bin/psql/settings.h        |   14 ++++++++
src/bin/psql/startup.c         |   78 +++++++++++++++++++++++++++++-----------
src/bin/psql/tab-complete.c    |   34 +++++-------------
src/bin/psql/variables.c       |   15 +++++---
src/bin/psql/variables.h       |    2 +-
7 files changed, 124 insertions(+), 76 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve consistency of parsing of psql's magic variables.
@ 2014-12-31 17:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2014-12-31 17:19 UTC (permalink / raw)
  To: pgsql-committers

Improve consistency of parsing of psql's magic variables.

For simple boolean variables such as ON_ERROR_STOP, psql has for a long
time recognized variant spellings of "on" and "off" (such as "1"/"0"),
and it also made a point of warning you if you'd misspelled the setting.
But these conveniences did not exist for other keyword-valued variables.
In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
"off" as possible values, none of the alternative spellings for those were
recognized; and to make matters worse the code would just silently assume
"on" was meant for any unrecognized spelling.  Several people have reported
getting bitten by this, so let's fix it.  In detail, this patch:

* Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
and ON_ERROR_ROLLBACK.

* Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.

* Recognizes all values for all these variables case-insensitively;
previously there was a mishmash of case-sensitive and case-insensitive
behaviors.

Back-patch to all supported branches.  There is a small risk of breaking
existing scripts that were accidentally failing to malfunction; but the
consensus is that the chance of detecting real problems and preventing
future mistakes outweighs this.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c35249939b3addf8dc2f57d9213e8aeadc7bccd1

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |   39 +++++++++++----------
src/bin/psql/command.c         |   18 ++++++----
src/bin/psql/settings.h        |   14 ++++++++
src/bin/psql/startup.c         |   76 ++++++++++++++++++++++++++++++----------
src/bin/psql/tab-complete.c    |   34 +++++-------------
src/bin/psql/variables.c       |   15 +++++---
src/bin/psql/variables.h       |    2 +-
7 files changed, 123 insertions(+), 75 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve consistency of parsing of psql's magic variables.
@ 2014-12-31 17:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2014-12-31 17:19 UTC (permalink / raw)
  To: pgsql-committers

Improve consistency of parsing of psql's magic variables.

For simple boolean variables such as ON_ERROR_STOP, psql has for a long
time recognized variant spellings of "on" and "off" (such as "1"/"0"),
and it also made a point of warning you if you'd misspelled the setting.
But these conveniences did not exist for other keyword-valued variables.
In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
"off" as possible values, none of the alternative spellings for those were
recognized; and to make matters worse the code would just silently assume
"on" was meant for any unrecognized spelling.  Several people have reported
getting bitten by this, so let's fix it.  In detail, this patch:

* Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
and ON_ERROR_ROLLBACK.

* Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.

* Recognizes all values for all these variables case-insensitively;
previously there was a mishmash of case-sensitive and case-insensitive
behaviors.

Back-patch to all supported branches.  There is a small risk of breaking
existing scripts that were accidentally failing to malfunction; but the
consensus is that the chance of detecting real problems and preventing
future mistakes outweighs this.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7582cce56616c991e62e1122873ce8c694e6f8a0

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |   39 +++++++++++----------
src/bin/psql/command.c         |   18 ++++++----
src/bin/psql/settings.h        |   14 ++++++++
src/bin/psql/startup.c         |   76 ++++++++++++++++++++++++++++++----------
src/bin/psql/tab-complete.c    |   34 +++++-------------
src/bin/psql/variables.c       |   15 +++++---
src/bin/psql/variables.h       |    2 +-
7 files changed, 123 insertions(+), 75 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve consistency of parsing of psql's magic variables.
@ 2014-12-31 17:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2014-12-31 17:19 UTC (permalink / raw)
  To: pgsql-committers

Improve consistency of parsing of psql's magic variables.

For simple boolean variables such as ON_ERROR_STOP, psql has for a long
time recognized variant spellings of "on" and "off" (such as "1"/"0"),
and it also made a point of warning you if you'd misspelled the setting.
But these conveniences did not exist for other keyword-valued variables.
In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
"off" as possible values, none of the alternative spellings for those were
recognized; and to make matters worse the code would just silently assume
"on" was meant for any unrecognized spelling.  Several people have reported
getting bitten by this, so let's fix it.  In detail, this patch:

* Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
and ON_ERROR_ROLLBACK.

* Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.

* Recognizes all values for all these variables case-insensitively;
previously there was a mishmash of case-sensitive and case-insensitive
behaviors.

Back-patch to all supported branches.  There is a small risk of breaking
existing scripts that were accidentally failing to malfunction; but the
consensus is that the chance of detecting real problems and preventing
future mistakes outweighs this.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/64c506535d6f8c719a126057b3b0796178c59915

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |   39 +++++++++++----------
src/bin/psql/command.c         |   18 ++++++----
src/bin/psql/settings.h        |   14 ++++++++
src/bin/psql/startup.c         |   76 ++++++++++++++++++++++++++++++----------
src/bin/psql/tab-complete.c    |   34 +++++-------------
src/bin/psql/variables.c       |   15 +++++---
src/bin/psql/variables.h       |    2 +-
7 files changed, 123 insertions(+), 75 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve consistency of parsing of psql's magic variables.
@ 2014-12-31 17:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2014-12-31 17:19 UTC (permalink / raw)
  To: pgsql-committers

Improve consistency of parsing of psql's magic variables.

For simple boolean variables such as ON_ERROR_STOP, psql has for a long
time recognized variant spellings of "on" and "off" (such as "1"/"0"),
and it also made a point of warning you if you'd misspelled the setting.
But these conveniences did not exist for other keyword-valued variables.
In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
"off" as possible values, none of the alternative spellings for those were
recognized; and to make matters worse the code would just silently assume
"on" was meant for any unrecognized spelling.  Several people have reported
getting bitten by this, so let's fix it.  In detail, this patch:

* Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
and ON_ERROR_ROLLBACK.

* Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.

* Recognizes all values for all these variables case-insensitively;
previously there was a mishmash of case-sensitive and case-insensitive
behaviors.

Back-patch to all supported branches.  There is a small risk of breaking
existing scripts that were accidentally failing to malfunction; but the
consensus is that the chance of detecting real problems and preventing
future mistakes outweighs this.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1773e07025e72b36fa5a1deeab55cd80f5383bcf

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |   39 ++++++++++++++--------------
src/bin/psql/command.c         |   18 ++++++++-----
src/bin/psql/startup.c         |   56 ++++++++++++++++++++++++++--------------
src/bin/psql/variables.c       |   15 ++++++++---
src/bin/psql/variables.h       |    2 +-
5 files changed, 79 insertions(+), 51 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve consistency of parsing of psql's magic variables.
@ 2014-12-31 17:19 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2014-12-31 17:19 UTC (permalink / raw)
  To: pgsql-committers

Improve consistency of parsing of psql's magic variables.

For simple boolean variables such as ON_ERROR_STOP, psql has for a long
time recognized variant spellings of "on" and "off" (such as "1"/"0"),
and it also made a point of warning you if you'd misspelled the setting.
But these conveniences did not exist for other keyword-valued variables.
In particular, though ECHO_HIDDEN and ON_ERROR_ROLLBACK include "on" and
"off" as possible values, none of the alternative spellings for those were
recognized; and to make matters worse the code would just silently assume
"on" was meant for any unrecognized spelling.  Several people have reported
getting bitten by this, so let's fix it.  In detail, this patch:

* Allows all spellings recognized by ParseVariableBool() for ECHO_HIDDEN
and ON_ERROR_ROLLBACK.

* Reports a warning for unrecognized values for COMP_KEYWORD_CASE, ECHO,
ECHO_HIDDEN, HISTCONTROL, ON_ERROR_ROLLBACK, and VERBOSITY.

* Recognizes all values for all these variables case-insensitively;
previously there was a mishmash of case-sensitive and case-insensitive
behaviors.

Back-patch to all supported branches.  There is a small risk of breaking
existing scripts that were accidentally failing to malfunction; but the
consensus is that the chance of detecting real problems and preventing
future mistakes outweighs this.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2600e44364cbbf418bcff39ce1d45025e9844386

Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml |   43 +++++++++++++++---------------
src/bin/psql/command.c         |   18 ++++++++-----
src/bin/psql/startup.c         |   56 ++++++++++++++++++++++++++--------------
src/bin/psql/variables.c       |   15 ++++++++---
src/bin/psql/variables.h       |    2 +-
5 files changed, 81 insertions(+), 53 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2014-12-31 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-12-31 17:19 pgsql: Improve consistency of parsing of psql's magic variables. Tom Lane <tgl@sss.pgh.pa.us>
2014-12-31 17:19 pgsql: Improve consistency of parsing of psql's magic variables. Tom Lane <tgl@sss.pgh.pa.us>
2014-12-31 17:19 pgsql: Improve consistency of parsing of psql's magic variables. Tom Lane <tgl@sss.pgh.pa.us>
2014-12-31 17:19 pgsql: Improve consistency of parsing of psql's magic variables. Tom Lane <tgl@sss.pgh.pa.us>
2014-12-31 17:19 pgsql: Improve consistency of parsing of psql's magic variables. Tom Lane <tgl@sss.pgh.pa.us>
2014-12-31 17:19 pgsql: Improve consistency of parsing of psql's magic variables. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox