postgresql/src/include
Tom Lane fb8697b31a Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers.
We have a lot of code in which option names, which from the user's
viewpoint are logically keywords, are passed through the grammar as plain
identifiers, and then matched to string literals during command execution.
This approach avoids making words into lexer keywords unnecessarily.  Some
places matched these strings using plain strcmp, some using pg_strcasecmp.
But the latter should be unnecessary since identifiers would have been
downcased on their way through the parser.  Aside from any efficiency
concerns (probably not a big factor), the lack of consistency in this area
creates a hazard of subtle bugs due to different places coming to different
conclusions about whether two option names are the same or different.
Hence, standardize on using strcmp() to match any option names that are
expected to have been fed through the parser.

This does create a user-visible behavioral change, which is that while
formerly all of these would work:
	alter table foo set (fillfactor = 50);
	alter table foo set (FillFactor = 50);
	alter table foo set ("fillfactor" = 50);
	alter table foo set ("FillFactor" = 50);
now the last case will fail because that double-quoted identifier is
different from the others.  However, none of our documentation says that
you can use a quoted identifier in such contexts at all, and we should
discourage doing so since it would break if we ever decide to parse such
constructs as true lexer keywords rather than poor man's substitutes.
So this shouldn't create a significant compatibility issue for users.

Daniel Gustafsson, reviewed by Michael Paquier, small changes by me

Discussion: https://postgr.es/m/29405B24-564E-476B-98C0-677A29805B84@yesql.se
2018-01-26 18:25:14 -05:00
..
access Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
bootstrap Update copyright for 2018 2018-01-02 23:30:12 -05:00
catalog Replace AclObjectKind with ObjectType 2018-01-19 14:01:15 -05:00
commands Transaction control in PL procedures 2018-01-22 08:43:06 -05:00
common Implement channel binding tls-server-end-point for SCRAM 2018-01-04 15:29:50 -05:00
datatype Update copyright for 2018 2018-01-02 23:30:12 -05:00
executor Avoid referencing off the end of subplan_partition_offsets. 2018-01-24 16:34:51 -05:00
fe_utils Update copyright for 2018 2018-01-02 23:30:12 -05:00
foreign Update copyright for 2018 2018-01-02 23:30:12 -05:00
lib Update copyright for 2018 2018-01-02 23:30:12 -05:00
libpq Use abstracted SSL API in server connection log messages 2018-01-26 09:50:46 -05:00
mb Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Remove the obsolete WITH clause of CREATE FUNCTION. 2018-01-26 12:25:44 -05:00
optimizer Allow UPDATE to move rows between partitions. 2018-01-19 15:33:06 -05:00
parser Local partitioned indexes 2018-01-19 11:49:22 -03:00
port Remove outdated/removed Win32 URLs in C comments 2018-01-09 18:33:21 -05:00
portability Update copyright for 2018 2018-01-02 23:30:12 -05:00
postmaster Update copyright for 2018 2018-01-02 23:30:12 -05:00
regex Update copyright for 2018 2018-01-02 23:30:12 -05:00
replication Ability to advance replication slots 2018-01-17 11:38:34 +00:00
rewrite Update copyright for 2018 2018-01-02 23:30:12 -05:00
snowball Update copyright for 2018 2018-01-02 23:30:12 -05:00
statistics Update copyright for 2018 2018-01-02 23:30:12 -05:00
storage Allow ConditionVariable[PrepareTo]Sleep to auto-switch between CVs. 2018-01-09 11:39:10 -05:00
tcop Replace GrantObjectType with ObjectType 2018-01-19 14:01:14 -05:00
tsearch Update copyright for 2018 2018-01-02 23:30:12 -05:00
utils Split out documentation of SSL parameters into their own section 2018-01-23 07:11:38 -05:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
Makefile Add statistics subdirectory to Makefile. 2017-06-08 11:29:50 -04:00
c.h Improve implementation of pg_attribute_always_inline. 2018-01-23 23:07:13 -05:00
fmgr.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
funcapi.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
getaddrinfo.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
getopt_long.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
miscadmin.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_config.h.in Another attempt at fixing build with various OpenSSL versions 2018-01-04 19:09:27 -05:00
pg_config.h.win32 Provide overflow safe integer math inline functions. 2017-12-12 16:55:37 -08:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_getopt.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_trace.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgstat.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgtar.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgtime.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
port.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
postgres.h Remove byte-masking macros for Datum conversion macros 2018-01-26 08:46:27 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
rusagestub.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
windowapi.h Update copyright for 2018 2018-01-02 23:30:12 -05:00