PostgreSQL Source Code git master
Loading...
Searching...
No Matches
varatt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  varatt_external
 
struct  varatt_indirect
 
struct  varatt_expanded
 
union  varattrib_4b
 
struct  varattrib_1b
 
struct  varattrib_1b_e
 

Macros

#define VARLENA_EXTSIZE_BITS   30
 
#define VARLENA_EXTSIZE_MASK   ((1U << VARLENA_EXTSIZE_BITS) - 1)
 
#define VARATT_IS_4B(PTR)    ((((const varattrib_1b *) (PTR))->va_header & 0x01) == 0x00)
 
#define VARATT_IS_4B_U(PTR)    ((((const varattrib_1b *) (PTR))->va_header & 0x03) == 0x00)
 
#define VARATT_IS_4B_C(PTR)    ((((const varattrib_1b *) (PTR))->va_header & 0x03) == 0x02)
 
#define VARATT_IS_1B(PTR)    ((((const varattrib_1b *) (PTR))->va_header & 0x01) == 0x01)
 
#define VARATT_IS_1B_E(PTR)    ((((const varattrib_1b *) (PTR))->va_header) == 0x01)
 
#define VARATT_NOT_PAD_BYTE(PTR)    (*((const uint8 *) (PTR)) != 0)
 
#define VARSIZE_4B(PTR)    ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
 
#define VARSIZE_1B(PTR)    ((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
 
#define VARTAG_1B_E(PTR)    ((vartag_external) ((const varattrib_1b_e *) (PTR))->va_tag)
 
#define SET_VARSIZE_4B(PTR, len)    (((varattrib_4b *) (PTR))->va_4byte.va_header = (((uint32) (len)) << 2))
 
#define SET_VARSIZE_4B_C(PTR, len)    (((varattrib_4b *) (PTR))->va_4byte.va_header = (((uint32) (len)) << 2) | 0x02)
 
#define SET_VARSIZE_1B(PTR, len)    (((varattrib_1b *) (PTR))->va_header = (((uint8) (len)) << 1) | 0x01)
 
#define SET_VARTAG_1B_E(PTR, tag)
 
#define VARDATA_4B(PTR)   (((varattrib_4b *) (PTR))->va_4byte.va_data)
 
#define VARDATA_4B_C(PTR)   (((varattrib_4b *) (PTR))->va_compressed.va_data)
 
#define VARDATA_1B(PTR)   (((varattrib_1b *) (PTR))->va_data)
 
#define VARDATA_1B_E(PTR)   (((varattrib_1b_e *) (PTR))->va_data)
 
#define VARHDRSZ_EXTERNAL   offsetof(varattrib_1b_e, va_data)
 
#define VARHDRSZ_COMPRESSED   offsetof(varattrib_4b, va_compressed.va_data)
 
#define VARHDRSZ_SHORT   offsetof(varattrib_1b, va_data)
 
#define VARATT_SHORT_MAX   0x7F
 
#define VARATT_EXTERNAL_SET_SIZE_AND_COMPRESS_METHOD(toast_pointer, len, cm)
 

Typedefs

typedef struct varatt_external varatt_external
 
typedef struct varatt_indirect varatt_indirect
 
typedef struct ExpandedObjectHeader ExpandedObjectHeader
 
typedef struct varatt_expanded varatt_expanded
 
typedef enum vartag_external vartag_external
 

Enumerations

enum  vartag_external { VARTAG_INDIRECT = 1 , VARTAG_EXPANDED_RO = 2 , VARTAG_EXPANDED_RW = 3 , VARTAG_ONDISK = 18 }
 

Functions

static bool VARTAG_IS_EXPANDED (vartag_external tag)
 
static Size VARTAG_SIZE (vartag_external tag)
 
static Size VARSIZE (const void *PTR)
 
static charVARDATA (const void *PTR)
 
static Size VARSIZE_SHORT (const void *PTR)
 
static charVARDATA_SHORT (const void *PTR)
 
static vartag_external VARTAG_EXTERNAL (const void *PTR)
 
static Size VARSIZE_EXTERNAL (const void *PTR)
 
static charVARDATA_EXTERNAL (const void *PTR)
 
static bool VARATT_IS_COMPRESSED (const void *PTR)
 
static bool VARATT_IS_EXTERNAL (const void *PTR)
 
static bool VARATT_IS_EXTERNAL_ONDISK (const void *PTR)
 
static bool VARATT_IS_EXTERNAL_INDIRECT (const void *PTR)
 
static bool VARATT_IS_EXTERNAL_EXPANDED_RO (const void *PTR)
 
static bool VARATT_IS_EXTERNAL_EXPANDED_RW (const void *PTR)
 
static bool VARATT_IS_EXTERNAL_EXPANDED (const void *PTR)
 
static bool VARATT_IS_EXTERNAL_NON_EXPANDED (const void *PTR)
 
static bool VARATT_IS_SHORT (const void *PTR)
 
static bool VARATT_IS_EXTENDED (const void *PTR)
 
static bool VARATT_CAN_MAKE_SHORT (const void *PTR)
 
static Size VARATT_CONVERTED_SHORT_SIZE (const void *PTR)
 
static void SET_VARSIZE (void *PTR, Size len)
 
static void SET_VARSIZE_SHORT (void *PTR, Size len)
 
static void SET_VARSIZE_COMPRESSED (void *PTR, Size len)
 
static void SET_VARTAG_EXTERNAL (void *PTR, vartag_external tag)
 
static Size VARSIZE_ANY (const void *PTR)
 
static Size VARSIZE_ANY_EXHDR (const void *PTR)
 
static charVARDATA_ANY (const void *PTR)
 
static Size VARDATA_COMPRESSED_GET_EXTSIZE (const void *PTR)
 
static uint32 VARDATA_COMPRESSED_GET_COMPRESS_METHOD (const void *PTR)
 
static Size VARATT_EXTERNAL_GET_EXTSIZE (struct varatt_external toast_pointer)
 
static uint32 VARATT_EXTERNAL_GET_COMPRESS_METHOD (struct varatt_external toast_pointer)
 
static bool VARATT_EXTERNAL_IS_COMPRESSED (struct varatt_external toast_pointer)
 

Macro Definition Documentation

◆ SET_VARSIZE_1B

#define SET_VARSIZE_1B (   PTR,
  len 
)     (((varattrib_1b *) (PTR))->va_header = (((uint8) (len)) << 1) | 0x01)

Definition at line 253 of file varatt.h.

299{
300 return VARSIZE_4B(PTR);
301}
302
303/* Start of data area of a known-not-toasted varlena datum */
304static inline char *
305VARDATA(const void *PTR)
306{
307 return VARDATA_4B(PTR);
308}
309
310/* Size of a known-short-header varlena datum, including header */
311static inline Size
312VARSIZE_SHORT(const void *PTR)
313{
314 return VARSIZE_1B(PTR);
315}
316
317/* Start of data area of a known-short-header varlena datum */
318static inline char *
319VARDATA_SHORT(const void *PTR)
320{
321 return VARDATA_1B(PTR);
322}
323
324/* Type tag of a "TOAST pointer" datum */
325static inline vartag_external
326VARTAG_EXTERNAL(const void *PTR)
327{
328 return VARTAG_1B_E(PTR);
329}
330
331/* Size of a "TOAST pointer" datum, including header */
332static inline Size
333VARSIZE_EXTERNAL(const void *PTR)
334{
336}
337
338/* Start of data area of a "TOAST pointer" datum */
339static inline char *
340VARDATA_EXTERNAL(const void *PTR)
341{
342 return VARDATA_1B_E(PTR);
343}
344
345/* Is varlena datum in inline-compressed format? */
346static inline bool
347VARATT_IS_COMPRESSED(const void *PTR)
348{
349 return VARATT_IS_4B_C(PTR);
350}
351
352/* Is varlena datum a "TOAST pointer" datum? */
353static inline bool
354VARATT_IS_EXTERNAL(const void *PTR)
355{
356 return VARATT_IS_1B_E(PTR);
357}
358
359/* Is varlena datum a pointer to on-disk toasted data? */
360static inline bool
362{
364}
365
366/* Is varlena datum an indirect pointer? */
367static inline bool
369{
371}
372
373/* Is varlena datum a read-only pointer to an expanded object? */
374static inline bool
376{
378}
379
380/* Is varlena datum a read-write pointer to an expanded object? */
381static inline bool
383{
385}
386
387/* Is varlena datum either type of pointer to an expanded object? */
388static inline bool
390{
392}
393
394/* Is varlena datum a "TOAST pointer", but not for an expanded object? */
395static inline bool
397{
399}
400
401/* Is varlena datum a short-header datum? */
402static inline bool
403VARATT_IS_SHORT(const void *PTR)
404{
405 return VARATT_IS_1B(PTR);
406}
407
408/* Is varlena datum not in traditional (4-byte-header, uncompressed) format? */
409static inline bool
410VARATT_IS_EXTENDED(const void *PTR)
411{
412 return !VARATT_IS_4B_U(PTR);
413}
414
415/* Is varlena datum short enough to convert to short-header format? */
416static inline bool
417VARATT_CAN_MAKE_SHORT(const void *PTR)
418{
419 return VARATT_IS_4B_U(PTR) &&
421}
422
423/* Size that datum will have in short-header format, including header */
424static inline Size
426{
428}
429
430/* Set the size (including header) of a 4-byte-header varlena datum */
431static inline void
432SET_VARSIZE(void *PTR, Size len)
433{
435}
436
437/* Set the size (including header) of a short-header varlena datum */
438static inline void
440{
442}
443
444/* Set the size (including header) of an inline-compressed varlena datum */
445static inline void
447{
449}
450
451/* Set the type tag of a "TOAST pointer" datum */
452static inline void
454{
455 SET_VARTAG_1B_E(PTR, tag);
456}
457
458/* Size of a varlena datum of any format, including header */
459static inline Size
460VARSIZE_ANY(const void *PTR)
461{
462 if (VARATT_IS_1B_E(PTR))
463 return VARSIZE_EXTERNAL(PTR);
464 else if (VARATT_IS_1B(PTR))
465 return VARSIZE_1B(PTR);
466 else
467 return VARSIZE_4B(PTR);
468}
469
470/* Size of a varlena datum of any format, excluding header */
471static inline Size
472VARSIZE_ANY_EXHDR(const void *PTR)
473{
474 if (VARATT_IS_1B_E(PTR))
476 else if (VARATT_IS_1B(PTR))
477 return VARSIZE_1B(PTR) - VARHDRSZ_SHORT;
478 else
479 return VARSIZE_4B(PTR) - VARHDRSZ;
480}
481
482/* Start of data area of a plain or short-header varlena datum */
483/* caution: this will not work on an external or compressed-in-line Datum */
484/* caution: this will return a possibly unaligned pointer */
485static inline char *
486VARDATA_ANY(const void *PTR)
487{
489}
490
491/* Decompressed size of a compressed-in-line varlena datum */
492static inline Size
494{
495 return ((const varattrib_4b *) PTR)->va_compressed.va_tcinfo & VARLENA_EXTSIZE_MASK;
496}
497
498/* Compression method of a compressed-in-line varlena datum */
499static inline uint32
501{
502 return ((const varattrib_4b *) PTR)->va_compressed.va_tcinfo >> VARLENA_EXTSIZE_BITS;
503}
504
505/* Same for external Datums; but note argument is a struct varatt_external */
506static inline Size
508{
509 return toast_pointer.va_extinfo & VARLENA_EXTSIZE_MASK;
510}
511
512static inline uint32
514{
515 return toast_pointer.va_extinfo >> VARLENA_EXTSIZE_BITS;
516}
517
518/* Set size and compress method of an externally-stored varlena datum */
519/* This has to remain a macro; beware multiple evaluations! */
520#define VARATT_EXTERNAL_SET_SIZE_AND_COMPRESS_METHOD(toast_pointer, len, cm) \
521 do { \
522 Assert((cm) == TOAST_PGLZ_COMPRESSION_ID || \
523 (cm) == TOAST_LZ4_COMPRESSION_ID); \
524 ((toast_pointer).va_extinfo = \
525 (len) | ((uint32) (cm) << VARLENA_EXTSIZE_BITS)); \
526 } while (0)
527
528/*
529 * Testing whether an externally-stored value is compressed now requires
530 * comparing size stored in va_extinfo (the actual length of the external data)
531 * to rawsize (the original uncompressed datum's size). The latter includes
532 * VARHDRSZ overhead, the former doesn't. We never use compression unless it
533 * actually saves space, so we expect either equality or less-than.
534 */
535static inline bool
537{
538 return VARATT_EXTERNAL_GET_EXTSIZE(toast_pointer) <
539 (Size) (toast_pointer.va_rawsize - VARHDRSZ);
540}
541
542#endif
#define VARHDRSZ
Definition c.h:711
uint32_t uint32
Definition c.h:546
size_t Size
Definition c.h:619
const void size_t len
static int fb(int x)
uint32 va_extinfo
Definition varatt.h:35
int32 va_rawsize
Definition varatt.h:34
#define VARHDRSZ_SHORT
Definition varatt.h:278
#define VARLENA_EXTSIZE_BITS
Definition varatt.h:45
#define VARTAG_1B_E(PTR)
Definition varatt.h:246
static bool VARATT_IS_SHORT(const void *PTR)
Definition varatt.h:403
#define VARATT_IS_4B_C(PTR)
Definition varatt.h:232
#define SET_VARSIZE_4B(PTR, len)
Definition varatt.h:249
static Size VARDATA_COMPRESSED_GET_EXTSIZE(const void *PTR)
Definition varatt.h:493
static void SET_VARSIZE_COMPRESSED(void *PTR, Size len)
Definition varatt.h:446
#define VARSIZE_1B(PTR)
Definition varatt.h:244
#define VARATT_IS_4B_U(PTR)
Definition varatt.h:230
static bool VARATT_IS_EXTERNAL_ONDISK(const void *PTR)
Definition varatt.h:361
static Size VARATT_EXTERNAL_GET_EXTSIZE(struct varatt_external toast_pointer)
Definition varatt.h:507
static Size VARSIZE_ANY(const void *PTR)
Definition varatt.h:460
static bool VARATT_CAN_MAKE_SHORT(const void *PTR)
Definition varatt.h:417
static bool VARATT_IS_EXTENDED(const void *PTR)
Definition varatt.h:410
static bool VARTAG_IS_EXPANDED(vartag_external tag)
Definition varatt.h:95
static uint32 VARDATA_COMPRESSED_GET_COMPRESS_METHOD(const void *PTR)
Definition varatt.h:500
#define VARDATA_4B(PTR)
Definition varatt.h:261
#define VARATT_IS_1B_E(PTR)
Definition varatt.h:236
static Size VARSIZE_ANY_EXHDR(const void *PTR)
Definition varatt.h:472
static bool VARATT_IS_EXTERNAL_EXPANDED_RW(const void *PTR)
Definition varatt.h:382
static bool VARATT_IS_EXTERNAL(const void *PTR)
Definition varatt.h:354
static char * VARDATA_EXTERNAL(const void *PTR)
Definition varatt.h:340
#define VARDATA_1B(PTR)
Definition varatt.h:263
static bool VARATT_IS_EXTERNAL_INDIRECT(const void *PTR)
Definition varatt.h:368
static Size VARSIZE(const void *PTR)
Definition varatt.h:298
static char * VARDATA(const void *PTR)
Definition varatt.h:305
static char * VARDATA_ANY(const void *PTR)
Definition varatt.h:486
static Size VARATT_CONVERTED_SHORT_SIZE(const void *PTR)
Definition varatt.h:425
static void SET_VARTAG_EXTERNAL(void *PTR, vartag_external tag)
Definition varatt.h:453
#define SET_VARSIZE_1B(PTR, len)
Definition varatt.h:253
static bool VARATT_IS_EXTERNAL_NON_EXPANDED(const void *PTR)
Definition varatt.h:396
#define VARDATA_1B_E(PTR)
Definition varatt.h:264
#define VARSIZE_4B(PTR)
Definition varatt.h:242
static bool VARATT_IS_COMPRESSED(const void *PTR)
Definition varatt.h:347
static vartag_external VARTAG_EXTERNAL(const void *PTR)
Definition varatt.h:326
static Size VARSIZE_EXTERNAL(const void *PTR)
Definition varatt.h:333
#define VARLENA_EXTSIZE_MASK
Definition varatt.h:46
static bool VARATT_IS_EXTERNAL_EXPANDED(const void *PTR)
Definition varatt.h:389
#define SET_VARTAG_1B_E(PTR, tag)
Definition varatt.h:255
static void SET_VARSIZE_SHORT(void *PTR, Size len)
Definition varatt.h:439
static Size VARTAG_SIZE(vartag_external tag)
Definition varatt.h:102
static bool VARATT_IS_EXTERNAL_EXPANDED_RO(const void *PTR)
Definition varatt.h:375
#define VARATT_SHORT_MAX
Definition varatt.h:279
#define SET_VARSIZE_4B_C(PTR, len)
Definition varatt.h:251
static char * VARDATA_SHORT(const void *PTR)
Definition varatt.h:319
vartag_external
Definition varatt.h:85
@ VARTAG_ONDISK
Definition varatt.h:89
@ VARTAG_EXPANDED_RW
Definition varatt.h:88
@ VARTAG_INDIRECT
Definition varatt.h:86
@ VARTAG_EXPANDED_RO
Definition varatt.h:87
#define VARATT_IS_1B(PTR)
Definition varatt.h:234
static uint32 VARATT_EXTERNAL_GET_COMPRESS_METHOD(struct varatt_external toast_pointer)
Definition varatt.h:513
#define VARHDRSZ_EXTERNAL
Definition varatt.h:276
static bool VARATT_EXTERNAL_IS_COMPRESSED(struct varatt_external toast_pointer)
Definition varatt.h:536
static void SET_VARSIZE(void *PTR, Size len)
Definition varatt.h:432
static Size VARSIZE_SHORT(const void *PTR)
Definition varatt.h:312

◆ SET_VARSIZE_4B

#define SET_VARSIZE_4B (   PTR,
  len 
)     (((varattrib_4b *) (PTR))->va_4byte.va_header = (((uint32) (len)) << 2))

Definition at line 249 of file varatt.h.

◆ SET_VARSIZE_4B_C

#define SET_VARSIZE_4B_C (   PTR,
  len 
)     (((varattrib_4b *) (PTR))->va_4byte.va_header = (((uint32) (len)) << 2) | 0x02)

Definition at line 251 of file varatt.h.

◆ SET_VARTAG_1B_E

#define SET_VARTAG_1B_E (   PTR,
  tag 
)
Value:
(((varattrib_1b_e *) (PTR))->va_header = 0x01, \
((varattrib_1b_e *) (PTR))->va_tag = (tag))

Definition at line 255 of file varatt.h.

◆ VARATT_EXTERNAL_SET_SIZE_AND_COMPRESS_METHOD

#define VARATT_EXTERNAL_SET_SIZE_AND_COMPRESS_METHOD (   toast_pointer,
  len,
  cm 
)
Value:
do { \
((toast_pointer).va_extinfo = \
(len) | ((uint32) (cm) << VARLENA_EXTSIZE_BITS)); \
} while (0)
@ TOAST_LZ4_COMPRESSION_ID
@ TOAST_PGLZ_COMPRESSION_ID

Definition at line 520 of file varatt.h.

521 { \
523 (cm) == TOAST_LZ4_COMPRESSION_ID); \
524 ((toast_pointer).va_extinfo = \
525 (len) | ((uint32) (cm) << VARLENA_EXTSIZE_BITS)); \
526 } while (0)

◆ VARATT_IS_1B

#define VARATT_IS_1B (   PTR)     ((((const varattrib_1b *) (PTR))->va_header & 0x01) == 0x01)

Definition at line 234 of file varatt.h.

◆ VARATT_IS_1B_E

#define VARATT_IS_1B_E (   PTR)     ((((const varattrib_1b *) (PTR))->va_header) == 0x01)

Definition at line 236 of file varatt.h.

◆ VARATT_IS_4B

#define VARATT_IS_4B (   PTR)     ((((const varattrib_1b *) (PTR))->va_header & 0x01) == 0x00)

Definition at line 228 of file varatt.h.

◆ VARATT_IS_4B_C

#define VARATT_IS_4B_C (   PTR)     ((((const varattrib_1b *) (PTR))->va_header & 0x03) == 0x02)

Definition at line 232 of file varatt.h.

◆ VARATT_IS_4B_U

#define VARATT_IS_4B_U (   PTR)     ((((const varattrib_1b *) (PTR))->va_header & 0x03) == 0x00)

Definition at line 230 of file varatt.h.

◆ VARATT_NOT_PAD_BYTE

#define VARATT_NOT_PAD_BYTE (   PTR)     (*((const uint8 *) (PTR)) != 0)

Definition at line 238 of file varatt.h.

◆ VARATT_SHORT_MAX

#define VARATT_SHORT_MAX   0x7F

Definition at line 279 of file varatt.h.

◆ VARDATA_1B

#define VARDATA_1B (   PTR)    (((varattrib_1b *) (PTR))->va_data)

Definition at line 263 of file varatt.h.

◆ VARDATA_1B_E

#define VARDATA_1B_E (   PTR)    (((varattrib_1b_e *) (PTR))->va_data)

Definition at line 264 of file varatt.h.

◆ VARDATA_4B

#define VARDATA_4B (   PTR)    (((varattrib_4b *) (PTR))->va_4byte.va_data)

Definition at line 261 of file varatt.h.

◆ VARDATA_4B_C

#define VARDATA_4B_C (   PTR)    (((varattrib_4b *) (PTR))->va_compressed.va_data)

Definition at line 262 of file varatt.h.

◆ VARHDRSZ_COMPRESSED

#define VARHDRSZ_COMPRESSED   offsetof(varattrib_4b, va_compressed.va_data)

Definition at line 277 of file varatt.h.

◆ VARHDRSZ_EXTERNAL

#define VARHDRSZ_EXTERNAL   offsetof(varattrib_1b_e, va_data)

Definition at line 276 of file varatt.h.

◆ VARHDRSZ_SHORT

#define VARHDRSZ_SHORT   offsetof(varattrib_1b, va_data)

Definition at line 278 of file varatt.h.

◆ VARLENA_EXTSIZE_BITS

#define VARLENA_EXTSIZE_BITS   30

Definition at line 45 of file varatt.h.

◆ VARLENA_EXTSIZE_MASK

#define VARLENA_EXTSIZE_MASK   ((1U << VARLENA_EXTSIZE_BITS) - 1)

Definition at line 46 of file varatt.h.

◆ VARSIZE_1B

#define VARSIZE_1B (   PTR)     ((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)

Definition at line 244 of file varatt.h.

◆ VARSIZE_4B

#define VARSIZE_4B (   PTR)     ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)

Definition at line 242 of file varatt.h.

◆ VARTAG_1B_E

#define VARTAG_1B_E (   PTR)     ((vartag_external) ((const varattrib_1b_e *) (PTR))->va_tag)

Definition at line 246 of file varatt.h.

Typedef Documentation

◆ ExpandedObjectHeader

◆ varatt_expanded

◆ varatt_external

◆ varatt_indirect

◆ vartag_external

Enumeration Type Documentation

◆ vartag_external

Enumerator
VARTAG_INDIRECT 
VARTAG_EXPANDED_RO 
VARTAG_EXPANDED_RW 
VARTAG_ONDISK 

Definition at line 84 of file varatt.h.

Function Documentation

◆ SET_VARSIZE()

static void SET_VARSIZE ( void PTR,
Size  len 
)
inlinestatic

Definition at line 432 of file varatt.h.

433{
435}

References fb(), len, and SET_VARSIZE_4B.

Referenced by _intbig_alloc(), _ltree_union(), aclnewowner(), aclupdate(), allocacl(), array_cat(), array_get_slice(), array_in(), array_map(), array_recv(), array_replace_internal(), array_set_element(), array_set_slice(), array_to_tsvector(), be_loread(), binary_decode(), binary_encode(), bit(), bit_and(), bit_catenate(), bit_in(), bit_or(), bit_recv(), bitfromint4(), bitfromint8(), bitnot(), bitsetbit(), bitshiftleft(), bitshiftright(), bitsubstring(), bitxor(), bloom_init(), box_poly(), bpchar(), bpchar_input(), bqarr_in(), brin_range_serialize(), buf_finalize(), buildint2vector(), buildoidvector(), bytea_catenate(), bytea_reverse(), bytea_string_agg_finalfn(), byteain(), bytearecv(), catenate_stringinfo_string(), char_bpchar(), char_text(), chr(), circle_poly(), cleanup_tsquery_stopwords(), concat_text(), construct_empty_array(), construct_md_array(), convertToJsonb(), copytext(), create_array_envelope(), cryptohash_internal(), cstring_to_text_with_len(), cube_a_f8(), cube_a_f8_f8(), cube_c_f8(), cube_c_f8_f8(), cube_enlarge(), cube_f8(), cube_f8_f8(), cube_inter(), cube_recv(), cube_subset(), cube_union_v0(), decrypt_internal(), detoast_attr(), detoast_attr_slice(), dobyteatrim(), EA_flatten_into(), encrypt_internal(), ExecEvalArrayExpr(), expandColorTrigrams(), fillRelOptions(), formTextDatum(), formTextDatum(), g_intbig_union(), gbt_bit_xfrm(), gbt_var_key_copy(), gbt_var_key_from_datum(), gbt_var_node_truncate(), generate_trgm(), generate_wildcard_trgm(), generateHeadline(), get_raw_page_internal(), GetWALBlockInfo(), ghstore_alloc(), ghstore_union(), gist_page_items_bytea(), gtrgm_alloc(), gtrgm_union(), gtsvector_alloc(), gtsvector_compress(), gtsvector_union(), heap_page_items(), HeapTupleHeaderGetTypeId(), hstore_concat(), hstore_delete(), hstore_delete_array(), hstore_delete_hstore(), hstore_subscript_assign(), hstorePairs(), inner_subltree(), int2vectorin(), inv_truncate(), inv_write(), JsonbValueToJsonb(), jsonPathFromCstring(), lca_inner(), lo_get_fragment_internal(), lpad(), ltree2text(), ltree_concat(), ltree_gist_alloc(), lz4_decompress_datum(), lz4_decompress_datum_slice(), make_greater_string(), make_multirange(), make_result_safe(), make_text_key(), make_tsvector(), makeArrayResultArr(), makeDefaultBloomOptions(), makeitem(), multirange_get_range(), new_intArrayType(), numeric_abbrev_convert(), oidvectorin(), optionListToArray(), parse_lquery(), parse_ltree(), parse_tsquery(), path_add(), path_in(), path_poly(), path_recv(), pg_armor(), pg_convert(), pg_current_snapshot(), pg_dearmor(), pg_decrypt(), pg_decrypt_iv(), pg_digest(), pg_encrypt(), pg_encrypt_iv(), pg_hmac(), pg_random_bytes(), pg_snapshot_recv(), pglz_decompress_datum(), pglz_decompress_datum_slice(), pgp_key_id_w(), PLyObject_ToBytea(), poly_in(), poly_path(), poly_recv(), pq_endtypsend(), QTN2QT(), queryin(), quote_literal(), range_serialize(), read_binary_file(), ReorderBufferToastReplace(), repeat(), resize_intArrayType(), rpad(), show_trgm(), similar_escape_internal(), spg_text_inner_consistent(), spg_text_leaf_consistent(), spgist_name_inner_consistent(), statext_dependencies_serialize(), statext_mcv_deserialize(), statext_mcv_serialize(), statext_ndistinct_serialize(), string_to_bytea_const(), test_enc_conversion(), text_catenate(), text_reverse(), text_substring(), toast_fetch_datum(), toast_fetch_datum_slice(), toast_save_datum(), transformRelOptions(), translate(), tsquery_rewrite(), tsquery_rewrite_query(), tsqueryrecv(), tsquerytree(), tsvector_concat(), tsvector_delete_by_indices(), tsvector_filter(), tsvector_strip(), tsvectorin(), tsvectorrecv(), tuple_data_split_internal(), unicode_normalize_func(), varbit(), varbit_in(), varbit_recv(), and xml_recv().

◆ SET_VARSIZE_COMPRESSED()

static void SET_VARSIZE_COMPRESSED ( void PTR,
Size  len 
)
inlinestatic

◆ SET_VARSIZE_SHORT()

static void SET_VARSIZE_SHORT ( void PTR,
Size  len 
)
inlinestatic

Definition at line 439 of file varatt.h.

440{
442}

References fb(), len, and SET_VARSIZE_1B.

Referenced by bt_normalize_tuple(), datum_write(), fill_val(), formTextDatum(), and formTextDatum().

◆ SET_VARTAG_EXTERNAL()

static void SET_VARTAG_EXTERNAL ( void PTR,
vartag_external  tag 
)
inlinestatic

Definition at line 453 of file varatt.h.

454{
455 SET_VARTAG_1B_E(PTR, tag);
456}

References fb(), and SET_VARTAG_1B_E.

Referenced by EOH_init_header(), make_tuple_indirect(), ReorderBufferToastReplace(), and toast_save_datum().

◆ VARATT_CAN_MAKE_SHORT()

static bool VARATT_CAN_MAKE_SHORT ( const void PTR)
inlinestatic

◆ VARATT_CONVERTED_SHORT_SIZE()

static Size VARATT_CONVERTED_SHORT_SIZE ( const void PTR)
inlinestatic

Definition at line 425 of file varatt.h.

426{
428}

References fb(), VARHDRSZ, VARHDRSZ_SHORT, and VARSIZE().

Referenced by bt_normalize_tuple(), datum_compute_size(), datum_write(), fill_val(), and heap_compute_data_size().

◆ VARATT_EXTERNAL_GET_COMPRESS_METHOD()

static uint32 VARATT_EXTERNAL_GET_COMPRESS_METHOD ( struct varatt_external  toast_pointer)
inlinestatic

Definition at line 513 of file varatt.h.

514{
515 return toast_pointer.va_extinfo >> VARLENA_EXTSIZE_BITS;
516}

References varatt_external::va_extinfo, and VARLENA_EXTSIZE_BITS.

Referenced by detoast_attr_slice(), and toast_get_compression_id().

◆ VARATT_EXTERNAL_GET_EXTSIZE()

◆ VARATT_EXTERNAL_IS_COMPRESSED()

static bool VARATT_EXTERNAL_IS_COMPRESSED ( struct varatt_external  toast_pointer)
inlinestatic

◆ VARATT_IS_COMPRESSED()

◆ VARATT_IS_EXTENDED()

◆ VARATT_IS_EXTERNAL()

◆ VARATT_IS_EXTERNAL_EXPANDED()

◆ VARATT_IS_EXTERNAL_EXPANDED_RO()

static bool VARATT_IS_EXTERNAL_EXPANDED_RO ( const void PTR)
inlinestatic

Definition at line 375 of file varatt.h.

References fb(), VARATT_IS_EXTERNAL(), VARTAG_EXPANDED_RO, and VARTAG_EXTERNAL().

Referenced by plpgsql_exec_function().

◆ VARATT_IS_EXTERNAL_EXPANDED_RW()

◆ VARATT_IS_EXTERNAL_INDIRECT()

◆ VARATT_IS_EXTERNAL_NON_EXPANDED()

static bool VARATT_IS_EXTERNAL_NON_EXPANDED ( const void PTR)
inlinestatic

Definition at line 396 of file varatt.h.

References fb(), VARATT_IS_EXTERNAL(), VARTAG_EXTERNAL(), and VARTAG_IS_EXPANDED().

Referenced by assign_simple_var().

◆ VARATT_IS_EXTERNAL_ONDISK()

◆ VARATT_IS_SHORT()

◆ VARDATA()

static char * VARDATA ( const void PTR)
inlinestatic

Definition at line 305 of file varatt.h.

306{
307 return VARDATA_4B(PTR);
308}

References fb(), and VARDATA_4B.

Referenced by array_agg_serialize(), array_send(), array_to_tsvector(), be_loread(), binary_decode(), binary_encode(), bpchar(), bpchar_input(), bt_normalize_tuple(), bytea_catenate(), bytea_reverse(), bytea_string_agg_finalfn(), byteain(), bytearecv(), byteaSetBit(), byteaSetByte(), catenate_stringinfo_string(), char_bpchar(), char_text(), chr(), concat_text(), copytext(), CopyToBinaryOneRow(), cryptohash_internal(), cstring_to_text_with_len(), datum_write(), detoast_attr(), detoast_attr_slice(), dobyteatrim(), encode_to_ascii(), fill_val(), gbt_bit_xfrm(), gbt_bytea_pf_match(), gbt_var_key_copy(), gbt_var_key_from_datum(), gbt_var_node_cp_len(), gbt_var_node_truncate(), gbt_var_penalty(), get_raw_page_internal(), GetWALBlockInfo(), ghstore_consistent(), gin_extract_hstore_query(), gist_page_items_bytea(), gtrgm_consistent(), gtrgm_distance(), heap_fetch_toast_slice(), heap_page_items(), hstore_from_array(), hstore_from_arrays(), hstore_hash(), hstore_hash_extended(), hstore_slice_to_array(), hstoreArrayToPairs(), inv_read(), inv_truncate(), inv_write(), JsonbValueToJsonb(), lo_get_fragment_internal(), logicalrep_write_tuple(), lpad(), ltree2text(), lz4_decompress_datum(), lz4_decompress_datum_slice(), make_greater_string(), make_text_key(), makeitem(), multirange_send(), numeric_abbrev_convert(), optionListToArray(), parseRelOptionsInternal(), pg_armor(), pg_convert(), pg_dearmor(), pg_decrypt(), pg_decrypt_iv(), pg_digest(), pg_encrypt(), pg_encrypt_iv(), pg_hmac(), pg_random_bytes(), pglz_decompress_datum(), pglz_decompress_datum_slice(), pgp_key_id_w(), PLyObject_ToBytea(), printtup(), quote_literal(), range_send(), read_binary_file(), read_text_file(), record_send(), ReorderBufferToastReplace(), repeat(), rpad(), SendFunctionResult(), serializeAnalyzeReceive(), show_trgm(), similar_escape_internal(), spg_text_inner_consistent(), spg_text_leaf_consistent(), spgist_name_inner_consistent(), spgist_name_leaf_consistent(), statext_dependencies_serialize(), statext_mcv_deserialize(), statext_mcv_serialize(), statext_ndistinct_serialize(), string_to_bytea_const(), test_enc_conversion(), text_catenate(), text_reverse(), text_substring(), toast_save_datum(), transformRelOptions(), translate(), tsvector_delete_arr(), tsvector_setweight_by_filter(), tuple_data_split_internal(), and xml_recv().

◆ VARDATA_ANY()

static char * VARDATA_ANY ( const void PTR)
inlinestatic

Definition at line 486 of file varatt.h.

487{
489}

References fb(), VARATT_IS_1B, VARDATA_1B, and VARDATA_4B.

Referenced by appendStringInfoRegexpSubstr(), appendStringInfoText(), array_agg_array_deserialize(), array_agg_deserialize(), ascii(), bcTruelen(), be_lo_from_bytea(), be_lo_put(), be_lowrite(), binary_decode(), binary_encode(), bpchar(), bpchar_larger(), bpchar_name(), bpchar_smaller(), bpcharcmp(), bpchareq(), bpcharfastcmp_c(), bpcharge(), bpchargt(), bpcharle(), bpcharlen(), bpcharlt(), bpcharne(), btnametextcmp(), btrim(), btrim1(), bttextnamecmp(), bytea_abbrev_convert(), bytea_bit_count(), bytea_catenate(), bytea_int2(), bytea_int4(), bytea_int8(), bytea_larger(), bytea_reverse(), bytea_smaller(), bytea_string_agg_transfn(), byteacmp(), byteaeq(), byteafastcmp(), byteage(), byteaGetBit(), byteaGetByte(), byteagt(), byteale(), bytealike(), bytealt(), byteane(), byteanlike(), byteaout(), byteapos(), casefold(), check_replace_text_has_escape(), citext_eq(), citext_hash(), citext_hash_extended(), citext_ne(), citextcmp(), CloneRowTriggersToPartition(), compare_lexeme_textfreq(), compare_text_lexemes(), concat_text(), convert_bytea_to_scalar(), convert_charset(), copytext(), crc32_bytea(), crc32c_bytea(), create_mbuf_from_vardata(), cryptohash_internal(), cvt_text_name(), datum_image_eq(), datum_image_hash(), datum_to_json_internal(), datum_to_jsonb_internal(), decrypt_internal(), deserialize_deflist(), dobyteatrim(), encrypt_internal(), escape_json_text(), extract_date(), find_provider(), Generic_Text_IC_like(), get_page_from_raw(), ghstore_consistent(), gin_cmp_prefix(), gin_cmp_tslexeme(), gin_compare_jsonb(), gin_extract_hstore_query(), gin_extract_jsonb_query(), gin_extract_query_trgm(), gin_extract_value_trgm(), gtrgm_compress(), hashbpchar(), hashbpcharextended(), hashinet(), hashinetextended(), hashtext(), hashtextextended(), hashvarlena(), hashvarlenaextended(), hstore_defined(), hstore_delete(), hstore_exists(), hstore_fetchval(), hstore_from_text(), hstore_subscript_assign(), hstore_subscript_fetch(), init_work(), initcap(), injection_points_attach_func(), int8_avg_deserialize(), internal_bpchar_pattern_compare(), internal_citext_pattern_cmp(), internal_text_pattern_compare(), interval_avg_deserialize(), interval_part_common(), interval_trunc(), json_populate_type(), json_send(), jsonb_delete(), jsonb_delete_array(), jsonb_exists(), jsonb_exists_all(), jsonb_exists_any(), jsonb_from_text(), jsonb_get_element(), jsonb_object_field(), jsonb_object_field_text(), JsonItemFromDatum(), length_in_encoding(), levenshtein(), levenshtein_less_equal(), levenshtein_less_equal_with_costs(), levenshtein_with_costs(), like_fixed_prefix(), like_fixed_prefix_ci(), lower(), lpad(), ltrim(), ltrim1(), lz4_compress_datum(), make_greater_string(), makeJsonLexContext(), map_sql_value_to_xml_value(), md5_bytea(), md5_text(), nameeqtext(), namelike(), namenetext(), namenlike(), numeric_avg_deserialize(), numeric_deserialize(), numeric_poly_deserialize(), numeric_to_number(), parse_re_flags(), parse_test_flags(), pg_armor(), pg_convert(), pg_dearmor(), pg_decrypt(), pg_decrypt_iv(), pg_digest(), pg_encrypt(), pg_encrypt_iv(), pg_get_triggerdef_worker(), pg_hmac(), pg_logical_emit_message_bytea(), pglz_compress_datum(), pgp_armor_headers(), pgxml_xpath(), PLyBytes_FromBytea(), populate_record_worker(), printsimple(), prs_setup_firstcall(), quote_literal(), RE_compile(), RE_compile_and_cache(), record_image_cmp(), regexp_like(), RelationBuildTriggers(), repeat(), replace_text(), replace_text_regexp(), rpad(), rtrim(), rtrim1(), setPathObject(), setup_regexp_matches(), setup_test_matches(), show_trgm(), similar_escape_internal(), similarity(), sort(), spg_text_choose(), spg_text_inner_consistent(), spg_text_leaf_consistent(), spg_text_picksplit(), spgist_name_choose(), spgist_name_inner_consistent(), spgist_name_leaf_consistent(), split_part(), split_text(), statext_dependencies_deserialize(), statext_mcv_deserialize(), statext_mcv_serialize(), statext_ndistinct_deserialize(), strict_word_similarity(), strict_word_similarity_commutator_op(), strict_word_similarity_dist_commutator_op(), strict_word_similarity_dist_op(), strict_word_similarity_op(), string_agg_deserialize(), test_custom_rmgrs_insert_wal_record(), test_enc_conversion(), test_re_compile(), test_shm_mq(), test_shm_mq_pipelined(), text_catenate(), text_char(), text_cmp(), text_format(), text_left(), text_length(), text_name(), text_position_setup(), text_reverse(), text_right(), text_starts_with(), text_substring(), text_to_cstring(), text_to_cstring_buffer(), texteq(), texteqname(), texticregexeq(), texticregexne(), textlike(), textne(), textnename(), textnlike(), textregexeq(), textregexne(), textregexreplace(), textregexsubstr(), textsend(), time_part_common(), timestamp_part_common(), timestamp_trunc(), timestamptz_part_common(), timestamptz_trunc_internal(), timetz_part_common(), to_tsvector_byid(), transform_jsonb_string_values(), translate(), ts_headline_byid_opt(), ts_lexize(), ts_stat_sql(), tsquery_opr_selec(), tsvector_delete_str(), tsvector_update_trigger(), unaccent_dict(), unicode_assigned(), unicode_is_normalized(), unicode_normalize_func(), unistr(), upper(), uuid_generate_v3(), uuid_generate_v5(), varchar(), varlenafastcmp_locale(), varstr_abbrev_convert(), varstrfastcmp_c(), word_similarity(), word_similarity_commutator_op(), word_similarity_dist_commutator_op(), word_similarity_dist_op(), word_similarity_op(), xmlcomment(), xpath_string(), and xslt_process().

◆ VARDATA_COMPRESSED_GET_COMPRESS_METHOD()

static uint32 VARDATA_COMPRESSED_GET_COMPRESS_METHOD ( const void PTR)
inlinestatic

Definition at line 500 of file varatt.h.

501{
502 return ((const varattrib_4b *) PTR)->va_compressed.va_tcinfo >> VARLENA_EXTSIZE_BITS;
503}

References fb(), and VARLENA_EXTSIZE_BITS.

Referenced by toast_get_compression_id(), and toast_save_datum().

◆ VARDATA_COMPRESSED_GET_EXTSIZE()

static Size VARDATA_COMPRESSED_GET_EXTSIZE ( const void PTR)
inlinestatic

Definition at line 493 of file varatt.h.

494{
495 return ((const varattrib_4b *) PTR)->va_compressed.va_tcinfo & VARLENA_EXTSIZE_MASK;
496}

References fb(), and VARLENA_EXTSIZE_MASK.

Referenced by lz4_decompress_datum(), pglz_decompress_datum(), toast_raw_datum_size(), and toast_save_datum().

◆ VARDATA_EXTERNAL()

static char * VARDATA_EXTERNAL ( const void PTR)
inlinestatic

Definition at line 340 of file varatt.h.

341{
342 return VARDATA_1B_E(PTR);
343}

References fb(), and VARDATA_1B_E.

Referenced by DatumGetEOHP(), EOH_init_header(), make_tuple_indirect(), ReorderBufferToastReplace(), and toast_save_datum().

◆ VARDATA_SHORT()

static char * VARDATA_SHORT ( const void PTR)
inlinestatic

Definition at line 319 of file varatt.h.

320{
321 return VARDATA_1B(PTR);
322}

References fb(), and VARDATA_1B.

Referenced by detoast_attr(), detoast_attr_slice(), heap_fetch_toast_slice(), numeric_abbrev_convert(), and toast_save_datum().

◆ VARSIZE()

static Size VARSIZE ( const void PTR)
inlinestatic

Definition at line 298 of file varatt.h.

299{
300 return VARSIZE_4B(PTR);
301}

References fb(), and VARSIZE_4B.

Referenced by _ltq_extract_regex(), _ltree_extract_isparent(), _ltree_extract_risparent(), _ltree_union(), _ltxtq_extract_exec(), array_agg_serialize(), array_send(), array_to_tsvector(), bit_and(), bit_or(), bitnot(), bitsetbit(), bitshiftleft(), bitshiftright(), bitxor(), brin_form_tuple(), bt_normalize_tuple(), byteaSetBit(), byteaSetByte(), check_toast_tuple(), CompareTSQ(), copy_ltree(), CopyToBinaryOneRow(), datum_write(), deparse_ltree(), detoast_attr_slice(), duplicate_numeric(), encode_to_ascii(), fill_val(), flattenJsonPathParseItem(), g_cube_binary_union(), g_cube_union(), g_int_union(), g_intbig_union(), gbt_bytea_pf_match(), gbt_var_key_copy(), gbt_var_key_from_datum(), gbt_var_key_readable(), gbt_var_node_cp_len(), gbt_var_node_truncate(), gbt_var_penalty(), get_attribute_options(), get_tablespace(), getdatafield(), ghstore_consistent(), ghstore_union(), gin_extract_hstore_query(), gtrgm_consistent(), gtrgm_distance(), gtrgm_penalty(), gtrgm_union(), gtsvector_compress(), gtsvector_union(), heap_fetch_toast_slice(), heap_page_items(), HeapTupleHeaderSetDatumLength(), hstore_concat(), hstore_delete(), hstore_delete_array(), hstore_delete_hstore(), hstore_from_array(), hstore_from_arrays(), hstore_hash(), hstore_hash_extended(), hstore_slice_to_array(), hstore_subscript_assign(), hstoreArrayToPairs(), hstoreUpgrade(), hstoreValidNewFormat(), hstoreValidOldFormat(), index_form_tuple_context(), json_populate_type(), jsonb_get_element(), jsonb_out(), jsonb_pretty(), jsonb_send(), JsonbToJsonbValue(), JsonbUnquote(), jsonpath_out(), jsonpath_send(), load_relcache_init_file(), logicalrep_write_tuple(), ltree2text(), ltree_concat(), ltree_gist_alloc(), ltree_union(), lz4_decompress_datum(), lz4_decompress_datum_slice(), multirange_send(), multirange_size_estimate(), parseRelOptionsInternal(), pg_detoast_datum_copy(), pg_snapshot_xip(), pglz_decompress_datum(), pglz_decompress_datum_slice(), populate_record_worker(), populate_scalar(), printtup(), range_deserialize(), range_get_flags(), range_send(), range_set_contain_empty(), read_text_file(), record_send(), RelationParseRelOptions(), ReorderBufferToastAppendChunk(), ReorderBufferToastReplace(), SendFunctionResult(), serializeAnalyzeReceive(), setup_firstcall(), silly_cmp_tsvector(), toast_compress_datum(), toast_datum_size(), toast_raw_datum_size(), toast_save_datum(), toast_tuple_try_compression(), transformRelOptions(), tsvector_concat(), tsvector_delete_arr(), tsvector_delete_by_indices(), tsvector_filter(), tsvector_setweight(), tsvector_setweight_by_filter(), tuple_data_split(), VARATT_CAN_MAKE_SHORT(), VARATT_CONVERTED_SHORT_SIZE(), write_multirange_data(), write_relcache_init_file(), xmlconcat(), and xmlroot().

◆ VARSIZE_ANY()

◆ VARSIZE_ANY_EXHDR()

static Size VARSIZE_ANY_EXHDR ( const void PTR)
inlinestatic

Definition at line 472 of file varatt.h.

473{
474 if (VARATT_IS_1B_E(PTR))
476 else if (VARATT_IS_1B(PTR))
477 return VARSIZE_1B(PTR) - VARHDRSZ_SHORT;
478 else
479 return VARSIZE_4B(PTR) - VARHDRSZ;
480}

References fb(), VARATT_IS_1B, VARATT_IS_1B_E, VARHDRSZ, VARHDRSZ_EXTERNAL, VARHDRSZ_SHORT, VARSIZE_1B, VARSIZE_4B, and VARSIZE_EXTERNAL().

Referenced by appendStringInfoRegexpSubstr(), appendStringInfoText(), array_agg_array_deserialize(), array_agg_deserialize(), ascii(), bcTruelen(), be_lo_from_bytea(), be_lo_put(), be_lowrite(), binary_decode(), binary_encode(), bpchar(), bpchar_name(), bpcharfastcmp_c(), btnametextcmp(), btrim(), btrim1(), bttextnamecmp(), bytea_abbrev_convert(), bytea_bit_count(), bytea_catenate(), bytea_int2(), bytea_int4(), bytea_int8(), bytea_larger(), bytea_reverse(), bytea_smaller(), bytea_string_agg_transfn(), byteacmp(), byteafastcmp(), byteage(), byteaGetBit(), byteaGetByte(), byteagt(), byteale(), bytealike(), bytealt(), byteanlike(), byteaout(), byteaoverlay_no_len(), byteapos(), casefold(), check_replace_text_has_escape(), citext_eq(), citext_hash(), citext_hash_extended(), citext_ne(), citextcmp(), compare_lexeme_textfreq(), compare_text_lexemes(), concat_text(), convert_bytea_to_scalar(), convert_charset(), copytext(), crc32_bytea(), crc32c_bytea(), create_mbuf_from_vardata(), cryptohash_internal(), cvt_text_name(), daitch_mokotoff(), datum_to_json_internal(), datum_to_jsonb_internal(), decrypt_internal(), deserialize_deflist(), do_to_timestamp(), dobyteatrim(), encrypt_internal(), escape_json_text(), extract_date(), find_provider(), Generic_Text_IC_like(), get_page_from_raw(), ghstore_consistent(), gin_cmp_prefix(), gin_cmp_tslexeme(), gin_compare_jsonb(), gin_extract_hstore_query(), gin_extract_jsonb_query(), gin_extract_query_trgm(), gin_extract_value_trgm(), gtrgm_compress(), hashtext(), hashtextextended(), hashvarlena(), hashvarlenaextended(), hstore_defined(), hstore_delete(), hstore_exists(), hstore_fetchval(), hstore_from_text(), hstore_subscript_assign(), hstore_subscript_fetch(), init_work(), initcap(), injection_points_attach_func(), int8_avg_deserialize(), internal_citext_pattern_cmp(), internal_text_pattern_compare(), interval_avg_deserialize(), interval_part_common(), interval_to_char(), interval_trunc(), json_populate_type(), json_send(), jsonb_delete(), jsonb_delete_array(), jsonb_exists(), jsonb_exists_all(), jsonb_exists_any(), jsonb_from_text(), jsonb_get_element(), jsonb_object_field(), jsonb_object_field_text(), JsonbInitBinary(), JsonItemFromDatum(), length_in_encoding(), levenshtein(), levenshtein_less_equal(), levenshtein_less_equal_with_costs(), levenshtein_with_costs(), like_fixed_prefix(), like_fixed_prefix_ci(), lower(), lpad(), ltrim(), ltrim1(), lz4_compress_datum(), make_greater_string(), makeJsonLexContext(), map_sql_value_to_xml_value(), md5_bytea(), md5_text(), nameeqtext(), namelike(), namenetext(), namenlike(), numeric_avg_deserialize(), numeric_deserialize(), numeric_poly_deserialize(), numeric_to_number(), parse_re_flags(), parse_test_flags(), pg_armor(), pg_convert(), pg_dearmor(), pg_decrypt(), pg_decrypt_iv(), pg_digest(), pg_encrypt(), pg_encrypt_iv(), pg_hmac(), pg_logical_emit_message_bytea(), pg_size_bytes(), pglz_compress_datum(), pgp_armor_headers(), pgxml_xpath(), PLyBytes_FromBytea(), populate_record_worker(), printsimple(), prs_setup_firstcall(), quote_literal(), RE_compile(), RE_compile_and_cache(), regexp_like(), repeat(), replace_text(), replace_text_regexp(), rpad(), rtrim(), rtrim1(), setPathObject(), setup_regexp_matches(), setup_test_matches(), show_trgm(), similar_escape_internal(), similarity(), sort(), spg_text_choose(), spg_text_inner_consistent(), spg_text_leaf_consistent(), spg_text_picksplit(), spgist_name_choose(), spgist_name_inner_consistent(), spgist_name_leaf_consistent(), split_part(), split_text(), statext_dependencies_deserialize(), statext_mcv_serialize(), statext_ndistinct_deserialize(), strict_word_similarity(), strict_word_similarity_commutator_op(), strict_word_similarity_dist_commutator_op(), strict_word_similarity_dist_op(), strict_word_similarity_op(), string_agg_deserialize(), string_agg_transfn(), test_custom_rmgrs_insert_wal_record(), test_enc_conversion(), test_re_compile(), test_shm_mq(), test_shm_mq_pipelined(), text_catenate(), text_char(), text_cmp(), text_format(), text_left(), text_length(), text_name(), text_position(), text_position_setup(), text_reverse(), text_right(), text_starts_with(), text_substring(), text_to_cstring(), text_to_cstring_buffer(), texteqname(), texticregexeq(), texticregexne(), textlike(), textnename(), textnlike(), textregexeq(), textregexne(), textregexreplace(), textregexsubstr(), textsend(), time_part_common(), timestamp_part_common(), timestamp_to_char(), timestamp_trunc(), timestamptz_part_common(), timestamptz_to_char(), timestamptz_trunc_internal(), timetz_part_common(), to_tsvector_byid(), toast_compress_datum(), transform_jsonb_string_values(), translate(), ts_headline_byid_opt(), ts_lexize(), ts_stat_sql(), tsquery_opr_selec(), tsvector_delete_str(), tsvector_update_trigger(), unaccent_dict(), unicode_assigned(), unicode_is_normalized(), unicode_normalize_func(), unistr(), upper(), uuid_generate_v3(), uuid_generate_v5(), varchar(), varlenafastcmp_locale(), varstr_abbrev_convert(), varstrfastcmp_c(), word_similarity(), word_similarity_commutator_op(), word_similarity_dist_commutator_op(), word_similarity_dist_op(), word_similarity_op(), xmlcomment(), xpath_string(), and xslt_process().

◆ VARSIZE_EXTERNAL()

static Size VARSIZE_EXTERNAL ( const void PTR)
inlinestatic

◆ VARSIZE_SHORT()

◆ VARTAG_EXTERNAL()

◆ VARTAG_IS_EXPANDED()

static bool VARTAG_IS_EXPANDED ( vartag_external  tag)
inlinestatic

Definition at line 95 of file varatt.h.

96{
97 return ((tag & ~1) == VARTAG_EXPANDED_RO);
98}

References VARTAG_EXPANDED_RO.

Referenced by VARATT_IS_EXTERNAL_EXPANDED(), VARATT_IS_EXTERNAL_NON_EXPANDED(), and VARTAG_SIZE().

◆ VARTAG_SIZE()

static Size VARTAG_SIZE ( vartag_external  tag)
inlinestatic

Definition at line 102 of file varatt.h.

103{
104 if (tag == VARTAG_INDIRECT)
105 return sizeof(varatt_indirect);
106 else if (VARTAG_IS_EXPANDED(tag))
107 return sizeof(varatt_expanded);
108 else if (tag == VARTAG_ONDISK)
109 return sizeof(varatt_external);
110 else
111 {
112 Assert(false);
113 return 0;
114 }
115}
#define Assert(condition)
Definition c.h:873

References Assert, VARTAG_INDIRECT, VARTAG_IS_EXPANDED(), and VARTAG_ONDISK.

Referenced by VARSIZE_EXTERNAL().