mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
5cabcfccce
array header, and to compute sizing and alignment of array elements the same way normal tuple access operations do --- viz, using the tupmacs.h macros att_addlength and att_align. This makes the world safe for arrays of cstrings or intervals, and should make it much easier to write array-type-polymorphic functions; as examples see the cleanups of array_out and contrib/array_iterator. By Joe Conway and Tom Lane.
44 lines
1.8 KiB
C
44 lines
1.8 KiB
C
#ifndef ARRAY_ITERATOR_H
|
|
#define ARRAY_ITERATOR_H
|
|
|
|
static int32 array_iterator(Oid proc, int and,
|
|
ArrayType *array, Datum value);
|
|
|
|
int32 array_texteq(ArrayType *array, void *value);
|
|
int32 array_all_texteq(ArrayType *array, void *value);
|
|
int32 array_textregexeq(ArrayType *array, void *value);
|
|
int32 array_all_textregexeq(ArrayType *array, void *value);
|
|
|
|
int32 array_varchareq(ArrayType *array, void *value);
|
|
int32 array_all_varchareq(ArrayType *array, void *value);
|
|
int32 array_varcharregexeq(ArrayType *array, void *value);
|
|
int32 array_all_varcharregexeq(ArrayType *array, void *value);
|
|
|
|
int32 array_bpchareq(ArrayType *array, void *value);
|
|
int32 array_all_bpchareq(ArrayType *array, void *value);
|
|
int32 array_bpcharregexeq(ArrayType *array, void *value);
|
|
int32 array_all_bpcharregexeq(ArrayType *array, void *value);
|
|
|
|
int32 array_int4eq(ArrayType *array, int4 value);
|
|
int32 array_all_int4eq(ArrayType *array, int4 value);
|
|
int32 array_int4ne(ArrayType *array, int4 value);
|
|
int32 array_all_int4ne(ArrayType *array, int4 value);
|
|
int32 array_int4gt(ArrayType *array, int4 value);
|
|
int32 array_all_int4gt(ArrayType *array, int4 value);
|
|
int32 array_int4ge(ArrayType *array, int4 value);
|
|
int32 array_all_int4ge(ArrayType *array, int4 value);
|
|
int32 array_int4lt(ArrayType *array, int4 value);
|
|
int32 array_all_int4lt(ArrayType *array, int4 value);
|
|
int32 array_int4le(ArrayType *array, int4 value);
|
|
int32 array_all_int4le(ArrayType *array, int4 value);
|
|
|
|
int32 array_oideq(ArrayType *array, Oid value);
|
|
int32 array_all_oidne(ArrayType *array, Oid value);
|
|
|
|
int32 array_ineteq(ArrayType *array, void *value);
|
|
int32 array_all_ineteq(ArrayType *array, void *value);
|
|
int32 array_inetne(ArrayType *array, void *value);
|
|
int32 array_all_inetne(ArrayType *array, void *value);
|
|
|
|
#endif
|