postgresql/contrib/pageinspect
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
..
expected Add relkind checks to certain contrib modules 2017-03-09 16:34:25 -05:00
sql Add relkind checks to certain contrib modules 2017-03-09 16:34:25 -05:00
.gitignore pageinspect: Add tests 2016-11-01 14:02:16 -04:00
Makefile pageinspect: Support hash indexes. 2017-02-02 14:19:32 -05:00
brinfuncs.c In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines. 2017-02-03 11:34:47 -05:00
btreefuncs.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
fsmfuncs.c In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines. 2017-02-03 11:34:47 -05:00
ginfuncs.c In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines. 2017-02-03 11:34:47 -05:00
hashfuncs.c Fix incorrect typecast. 2017-02-22 12:05:42 +05:30
heapfuncs.c In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines. 2017-02-03 11:34:47 -05:00
pageinspect--1.0--1.1.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
pageinspect--1.1--1.2.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
pageinspect--1.2--1.3.sql pageinspect/BRIN: minor tweaks 2014-12-02 12:20:50 -03:00
pageinspect--1.3--1.4.sql Add forgotten file in commit d6061f83a1 2015-11-25 16:59:07 +03:00
pageinspect--1.4--1.5.sql Update pageinspect extension for parallel query. 2016-06-09 17:18:09 -04:00
pageinspect--1.5--1.6.sql pageinspect: More type-sanity surgery on the new hash index code. 2017-02-03 16:28:13 -05:00
pageinspect--1.5.sql Update pageinspect extension for parallel query. 2016-06-09 17:18:09 -04:00
pageinspect--unpackaged--1.0.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
pageinspect.control pageinspect: Support hash indexes. 2017-02-02 14:19:32 -05:00
pageinspect.h In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines. 2017-02-03 11:34:47 -05:00
rawpage.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00