postgresql/src/backend/utils
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
..
adt Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
cache Reduce lock levels for table storage params related to planning 2017-03-06 16:04:31 +05:30
error Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
fmgr Fix typos in comments. 2017-02-06 11:33:58 +02:00
hash Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
init Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
mb Add KOI8-U map files to Makefile. 2017-02-02 14:12:35 +02:00
misc Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
mmgr Suppress compiler warning in slab.c. 2017-03-08 16:19:37 -05:00
resowner Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
sort Don't create "holes" in BufFiles, in the new logtape code. 2017-02-01 12:17:38 +02:00
time Handle unaligned SerializeSnapshot() buffer. 2017-03-02 00:03:27 -05:00
.gitignore Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
Gen_dummy_probes.pl Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Gen_dummy_probes.sed Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Gen_fmgrtab.pl Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
Makefile Fix parallel make issue with new fmgrprotos.h 2017-01-23 15:36:27 -05:00
errcodes.txt Use SQL standard error code for nextval 2017-03-09 10:56:44 -05:00
generate-errcodes.pl Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
probes.d Rename dtrace probes for ongoing xlog -> wal conversion. 2017-02-09 16:40:19 -05:00