postgresql/src
Noah Misch 3a0d473192 Use wrappers of PG_DETOAST_DATUM_PACKED() more.
This makes almost all core code follow the policy introduced in the
previous commit.  Specific decisions:

- Text search support functions with char* and length arguments, such as
  prsstart and lexize, may receive unaligned strings.  I doubt
  maintainers of non-core text search code will notice.

- Use plain VARDATA() on values detoasted or synthesized earlier in the
  same function.  Use VARDATA_ANY() on varlenas sourced outside the
  function, even if they happen to always have four-byte headers.  As an
  exception, retain the universal practice of using VARDATA() on return
  values of SendFunctionCall().

- Retain PG_GETARG_BYTEA_P() in pageinspect.  (Page images are too large
  for a one-byte header, so this misses no optimization.)  Sites that do
  not call get_page_from_raw() typically need the four-byte alignment.

- For now, do not change btree_gist.  Its use of four-byte headers in
  memory is partly entangled with storage of 4-byte headers inside
  GBT_VARKEY, on disk.

- For now, do not change gtrgm_consistent() or gtrgm_distance().  They
  incorporate the varlena header into a cache, and there are multiple
  credible implementation strategies to consider.
2017-03-12 19:35:34 -04:00
..
backend Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
bin Fix typo in initdb's SCRAM password processing. 2017-03-12 15:57:03 -04:00
common A collection of small fixes for the SCRAM patch. 2017-03-07 19:00:22 +02:00
fe_utils Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
include Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
interfaces Fix a potential double-free in ecpg. 2017-03-10 10:32:41 +01: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 wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
port Put back #include <windows.h> in dirmod.c. 2017-02-25 18:34:09 -05:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Improve expression evaluation test coverage. 2017-03-11 15:41:34 -08:00
timezone Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
tools Fix hard-coded relkind constants in assorted other files. 2017-03-09 23:36:52 -05:00
tutorial Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
.gitignore
DEVELOPERS
Makefile Remove redundant coverage target 2017-02-17 08:56:57 -05:00
Makefile.global.in Dept of second thoughts: rename new perl script. 2017-02-19 16:41:51 -05:00
Makefile.shlib Fix typos in comments. 2017-02-06 11:33:58 +02:00
bcc32.mak
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak