postgresql/src
Tom Lane fd6cd69803 Clean up psql's behavior for a few more control variables.
Modify FETCH_COUNT to always have a defined value, like other control
variables, mainly so it will always appear in "\set" output.

Add hooks to force HISTSIZE to be defined and require it to have an
integer value.  (I don't see any point in allowing it to be set to
non-integral values.)

Add hooks to force IGNOREEOF to be defined and require it to have an
integer value.  Unlike the other cases, here we're trying to be
bug-compatible with a rather bogus externally-defined behavior, so I think
we need to continue to allow "\set IGNOREEOF whatever".  Fix it so that
the substitution hook silently replace non-numeric values with "10",
so that the stored value always reflects what we're really doing.

Add a dummy assign hook for HISTFILE, just so it's always in
variables.c's list.  We can't require it to be defined always, because
that would break the interaction with the PSQL_HISTORY environment
variable, so there isn't any change in visible behavior here.

Remove tab-complete.c's private list of known variable names, since that's
really a maintenance nuisance.  Given the preceding changes, there are no
control variables it won't show anyway.  This does mean that if for some
reason you've unset one of the status variables (DBNAME, HOST, etc), that
variable would not appear in tab completion for \set.  But I think that's
fine, for at least two reasons: we shouldn't be encouraging people to use
those variables as regular variables, and if someone does do so anyway,
why shouldn't it act just like a regular variable?

Remove ugly and no-longer-used-anywhere GetVariableNum().  In general,
future additions of integer-valued control variables should follow the
paradigm of adding an assign hook using ParseVariableNum(), so there's
no reason to expect we'd need this again later.

Discussion: https://postgr.es/m/17516.1485973973@sss.pgh.pa.us
2017-02-02 20:16:17 -05:00
..
backend Fix placement of initPlans when forcibly materializing a subplan. 2017-02-02 19:11:32 -05:00
bin Clean up psql's behavior for a few more control variables. 2017-02-02 20:16:17 -05:00
common Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
fe_utils Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
include pageinspect: Support hash indexes. 2017-02-02 14:19:32 -05:00
interfaces Avoid improbable null pointer dereference in pgpassfileWarning(). 2017-02-02 19:49:15 -05:00
makefiles Try to fix non-MSVC Windows builds in the wake of logical replication. 2017-01-20 12:51:31 -05:00
pl Use castNode() in a bunch of statement-list-related code. 2017-01-26 22:09:34 -05:00
port Attempt to handle pending-delete files on Windows 2017-01-04 10:48:30 +01:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Fix placement of initPlans when forcibly materializing a subplan. 2017-02-02 19:11:32 -05:00
timezone Update time zone data files to tzdata release 2016j. 2017-01-30 11:40:22 -05:00
tools Extend index AM API for parallel index scans. 2017-01-24 16:42:58 -05:00
tutorial Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Logical replication 2017-01-20 09:04:49 -05:00
Makefile.global.in Fix cross-shlib linking in temporary installs on HPUX 10. 2017-01-21 15:15:39 -05:00
Makefile.shlib Fix cross-shlib linking in temporary installs on HPUX 10. 2017-01-21 15:15:39 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00