#include "postgres.h"
#include "access/htup_details.h"
#include "common/int.h"
#include "libpq/pqformat.h"
#include "nodes/nodeFuncs.h"
#include "nodes/supportnodes.h"
#include "port/pg_bitutils.h"
#include "utils/array.h"
#include "utils/fmgrprotos.h"
#include "utils/varbit.h"
Go to the source code of this file.
Definition at line 90 of file varbit.c.
References ArrayGetIntegerTypmods(), BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, and MaxAttrSize.
Referenced by bittypmodin(), and varbittypmodin().
Definition at line 127 of file varbit.c.
References palloc(), and snprintf.
Referenced by bittypmodout(), and varbittypmodout().
Definition at line 391 of file varbit.c.
References arg, ereport, errcode(), errmsg(), ERROR, len, Min, palloc0(), PG_GETARG_BOOL, PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBIT_PAD, VARBITBYTES, VARBITLEN, VARBITMAXLEN, VARBITS, and VARBITTOTALLEN.
Referenced by _hash_addovflpage(), bloom_add_value(), bloom_contains_value(), build_test_info_result(), fill_val(), hash_bitmap_info(), heap_fill_tuple(), RT_GROW_NODE_16(), RT_GROW_NODE_48(), and show_incremental_sort_group_info().
Definition at line 1243 of file varbit.c.
References ereport, errcode(), errmsg(), ERROR, i, len, palloc(), PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITBYTES, VARBITLEN, VARBITS, and VARSIZE().
Definition at line 1211 of file varbit.c.
References arg, PG_GETARG_VARBIT_P, pg_popcount(), PG_RETURN_INT64, VARBITBYTES, and VARBITS.
Definition at line 977 of file varbit.c.
References BITMASK, BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, palloc(), SET_VARSIZE(), VARBITBYTES, VARBITEND, VARBITLEN, VARBITMAXLEN, VARBITPAD, VARBITS, and VARBITTOTALLEN.
Referenced by bit_overlay(), and bitcat().
Definition at line 818 of file varbit.c.
References cmp(), Min, VARBITBYTES, VARBITLEN, and VARBITS.
Referenced by bitcmp(), biteq(), bitge(), bitgt(), bitle(), bitlt(), and bitne().
Definition at line 147 of file varbit.c.
References ereturn, errcode(), errmsg(), HIGHBIT, len, palloc0(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, pg_mblen(), PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITLEN, VARBITMAXLEN, VARBITS, VARBITTOTALLEN, and x.
Referenced by leftmostvalue_bit(), and make_const().
Definition at line 1284 of file varbit.c.
References ereport, errcode(), errmsg(), ERROR, i, len, palloc(), PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITBYTES, VARBITLEN, VARBITS, and VARSIZE().
Definition at line 280 of file varbit.c.
References HEXDIG, i, len, palloc(), PG_GETARG_VARBIT_P, PG_RETURN_CSTRING, VARBIT_CORRECTLY_PADDED, varbit_out(), VARBITLEN, and VARBITS.
Definition at line 1176 of file varbit.c.
References bit_catenate(), bitsubstring(), ereport, errcode(), errmsg(), ERROR, pg_add_s32_overflow(), s1, and s2.
Referenced by bitoverlay(), and bitoverlay_no_len().
Definition at line 331 of file varbit.c.
References buf, ereport, errcode(), errmsg(), ERROR, len, palloc(), PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_VARBIT_P, pq_copymsgbytes(), pq_getmsgint(), SET_VARSIZE(), VARBIT_PAD, VARBITBYTES, VARBITLEN, VARBITMAXLEN, VARBITS, and VARBITTOTALLEN.
Definition at line 376 of file varbit.c.
References varbit_send().
Definition at line 968 of file varbit.c.
References bit_catenate(), PG_GETARG_VARBIT_P, and PG_RETURN_VARBIT_P.
Definition at line 949 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, and PG_RETURN_INT32.
Definition at line 841 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, PG_RETURN_BOOL, and VARBITLEN.
Referenced by gbt_biteq().
Definition at line 1531 of file varbit.c.
References a, BITMASK, Min, palloc(), PG_GETARG_INT32, PG_RETURN_VARBIT_P, SET_VARSIZE(), val, VARBITLEN, VARBITMAXLEN, VARBITS, and VARBITTOTALLEN.
Definition at line 1611 of file varbit.c.
References a, BITMASK, Min, palloc(), PG_GETARG_INT32, PG_GETARG_INT64, PG_RETURN_VARBIT_P, SET_VARSIZE(), val, VARBITLEN, VARBITMAXLEN, VARBITS, and VARBITTOTALLEN.
Definition at line 934 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, and PG_RETURN_BOOL.
Referenced by gbt_bitge().
Definition at line 1869 of file varbit.c.
References BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_INT32, VARBITLEN, and VARBITS.
Definition at line 919 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, and PG_RETURN_BOOL.
Referenced by gbt_bitgt().
Definition at line 904 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, and PG_RETURN_BOOL.
Referenced by gbt_bitle().
Definition at line 1223 of file varbit.c.
References arg, PG_GETARG_VARBIT_P, PG_RETURN_INT32, and VARBITLEN.
Definition at line 889 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, and PG_RETURN_BOOL.
Referenced by gbt_bitlt().
Definition at line 865 of file varbit.c.
References bit_cmp(), PG_FREE_IF_COPY, PG_GETARG_VARBIT_P, PG_RETURN_BOOL, and VARBITLEN.
Definition at line 1365 of file varbit.c.
References arg, palloc(), PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBIT_PAD_LAST, VARBITEND, VARBITLEN, VARBITS, and VARSIZE().
Definition at line 1231 of file varbit.c.
References arg, PG_GETARG_VARBIT_P, PG_RETURN_INT32, and VARBITBYTES.
Definition at line 1153 of file varbit.c.
References bit_overlay(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, and PG_RETURN_VARBIT_P.
Definition at line 1164 of file varbit.c.
References bit_overlay(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, and VARBITLEN.
Definition at line 1698 of file varbit.c.
References BITMASK, BITS_PER_BYTE, cmp(), DEBUG4, elog, i, PG_GETARG_VARBIT_P, PG_RETURN_INT32, str, VARBITBYTES, VARBITEND, VARBITLEN, VARBITPAD, and VARBITS.
Definition at line 1807 of file varbit.c.
References BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, len, palloc(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITBYTES, VARBITLEN, VARBITS, and VARSIZE().
Definition at line 1392 of file varbit.c.
References arg, BITS_PER_BYTE, bitshiftright(), DirectFunctionCall2, Int32GetDatum(), len, MemSet, palloc(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_DATUM, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITBYTES, VARBITEND, VARBITLEN, VARBITMAXLEN, VarBitPGetDatum(), VARBITS, and VARSIZE().
Referenced by bitshiftright().
Definition at line 1459 of file varbit.c.
References arg, BITMASK, BITS_PER_BYTE, bitshiftleft(), DirectFunctionCall2, Int32GetDatum(), len, MemSet, palloc(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_DATUM, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBIT_PAD_LAST, VARBITBYTES, VARBITEND, VARBITLEN, VARBITMAXLEN, VarBitPGetDatum(), VARBITS, and VARSIZE().
Referenced by bitshiftleft().
Definition at line 1038 of file varbit.c.
References bitsubstring(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, and PG_RETURN_VARBIT_P.
Definition at line 1047 of file varbit.c.
References bitsubstring(), PG_GETARG_INT32, PG_GETARG_VARBIT_P, and PG_RETURN_VARBIT_P.
Definition at line 1055 of file varbit.c.
References arg, BITMASK, BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, i, len, Max, Min, palloc(), pg_add_s32_overflow(), ps, s1, SET_VARSIZE(), VARBIT_PAD, VARBITEND, VARBITHDRSZ, VARBITLEN, VARBITS, VARBITTOTALLEN, and VARHDRSZ.
Referenced by bit_overlay(), bitsubstr(), and bitsubstr_no_len().
Definition at line 1586 of file varbit.c.
References arg, BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, PG_GETARG_VARBIT_P, PG_RETURN_INT32, VARBITEND, VARBITLEN, VARBITPAD, and VARBITS.
Definition at line 1666 of file varbit.c.
References arg, BITS_PER_BYTE, ereport, errcode(), errmsg(), ERROR, PG_GETARG_VARBIT_P, PG_RETURN_INT64, VARBITEND, VARBITLEN, VARBITPAD, and VARBITS.
Definition at line 429 of file varbit.c.
References anybit_typmodin(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
Definition at line 437 of file varbit.c.
References anybit_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
Definition at line 1324 of file varbit.c.
References ereport, errcode(), errmsg(), ERROR, i, len, palloc(), PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITBYTES, VARBITLEN, VARBITS, and VARSIZE().
Definition at line 742 of file varbit.c.
References arg, ereport, errcode(), errmsg(), ERROR, len, palloc(), PG_GETARG_BOOL, PG_GETARG_INT32, PG_GETARG_VARBIT_P, PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBIT_PAD, VARBITBYTES, VARBITLEN, VARBITS, and VARBITTOTALLEN.
Definition at line 452 of file varbit.c.
References ereturn, errcode(), errmsg(), HIGHBIT, len, Min, palloc0(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, pg_mblen(), PG_RETURN_VARBIT_P, SET_VARSIZE(), VARBITLEN, VARBITMAXLEN, VARBITS, VARBITTOTALLEN, and x.
Referenced by leftmostvalue_varbit().
Definition at line 587 of file varbit.c.
References BITS_PER_BYTE, i, IS_HIGHBIT_SET, len, palloc(), PG_GETARG_VARBIT_P, PG_RETURN_CSTRING, VARBIT_CORRECTLY_PADDED, VARBITLEN, VARBITS, and x.
Referenced by bit_out().
Definition at line 636 of file varbit.c.
References buf, ereport, errcode(), errmsg(), ERROR, len, palloc(), PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_VARBIT_P, pq_copymsgbytes(), pq_getmsgint(), SET_VARSIZE(), VARBIT_PAD, VARBITBYTES, VARBITLEN, VARBITMAXLEN, VARBITS, and VARBITTOTALLEN.
Definition at line 681 of file varbit.c.
References buf, PG_GETARG_VARBIT_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendbytes(), pq_sendint32(), VARBITBYTES, VARBITLEN, and VARBITS.
Referenced by bit_send().
Definition at line 702 of file varbit.c.
References FuncExpr::args, Assert(), DatumGetInt32(), exprTypmod(), SupportRequestSimplify::fcall, IsA, linitial, list_length(), lsecond, PG_GETARG_POINTER, PG_RETURN_POINTER, relabel_to_typmod(), and source.
Definition at line 774 of file varbit.c.
References anybit_typmodin(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
Definition at line 782 of file varbit.c.
References anybit_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.