postgresql/src/backend/utils/adt
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
..
Makefile Create an SP-GiST opclass for inet/cidr. 2016-08-23 15:16:30 -04:00
acl.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
amutils.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
array_expanded.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
array_selfuncs.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
array_typanalyze.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
array_userfuncs.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
arrayfuncs.c Fix handling of empty arrays in array_fill(). 2017-01-05 11:33:51 -05:00
arrayutils.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
ascii.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
bool.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
cash.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
char.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
date.c Remove now-dead code for !HAVE_INT64_TIMESTAMP. 2017-02-23 14:04:43 -05:00
datetime.c Remove now-dead code for !HAVE_INT64_TIMESTAMP. 2017-02-23 14:04:43 -05:00
datum.c Don't invoke arbitrary code inside a possibly-aborted transaction. 2017-01-24 08:57:10 -05:00
dbsize.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
domains.c Remove obsoleted code relating to targetlist SRF evaluation. 2017-01-19 14:40:41 -08:00
encode.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
enum.c Add an Assert that enum_cmp_internal() gets passed an FmgrInfo pointer. 2017-02-23 22:08:10 -05:00
expandeddatum.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
float.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
format_type.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
formatting.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
genfile.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
geo_ops.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
geo_selfuncs.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
geo_spgist.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
inet_cidr_ntop.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
inet_net_pton.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
int.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
int8.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
json.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
jsonb.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
jsonb_gin.c Assume deconstruct_array() outputs are untoasted. 2017-03-12 19:35:31 -04:00
jsonb_op.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
jsonb_util.c Introduce convenience macros to hide JsonbContainer header accesses better. 2017-01-25 13:28:38 -05:00
jsonfuncs.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
levenshtein.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
like.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
like_match.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
lockfuncs.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
mac.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
misc.c Fix wrong word in comment. 2017-03-07 10:44:09 -05:00
nabstime.c Consistently declare timestamp variables as TimestampTz. 2017-02-23 15:57:08 -05:00
name.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
network.c Move code shared between libpq and backend from backend/libpq/ to common/. 2016-09-02 13:49:59 +03:00
network_gist.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
network_selfuncs.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
network_spgist.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
numeric.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
numutils.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
oid.c Collect duplicate copies of oid_cmp() 2017-03-01 11:55:28 -05:00
oracle_compat.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
orderedsetaggs.c Put back <float.h> in a few files that need it for _isnan(). 2017-03-08 15:38:34 -05:00
pg_locale.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
pg_lsn.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
pg_upgrade_support.c Assume deconstruct_array() outputs are untoasted. 2017-03-12 19:35:31 -04:00
pgstatfuncs.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
pseudotypes.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
quote.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
rangetypes.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
rangetypes_gist.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rangetypes_selfuncs.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
rangetypes_spgist.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
rangetypes_typanalyze.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
regexp.c Move some things from builtins.h to new header files 2017-01-20 20:29:53 -05:00
regproc.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
ri_triggers.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rowtypes.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
ruleutils.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
selfuncs.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
tid.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
timestamp.c Remove now-dead code for !HAVE_INT64_TIMESTAMP. 2017-02-23 14:04:43 -05:00
trigfuncs.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsginidx.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsgistidx.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
tsquery.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsquery_cleanup.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsquery_gist.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
tsquery_op.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
tsquery_rewrite.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
tsquery_util.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
tsrank.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
tsvector.c Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
tsvector_op.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
tsvector_parser.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
txid.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
uuid.c Make messages mentioning type names more uniform 2017-01-18 16:08:20 -03:00
varbit.c Make more use of castNode() 2017-02-21 11:59:09 -05:00
varchar.c Make more use of castNode() 2017-02-21 11:59:09 -05:00
varlena.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
version.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
windowfuncs.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
xid.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
xml.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00