|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/detoast.h"#include "access/htup_details.h"#include "catalog/pg_collation.h"#include "catalog/pg_type.h"#include "common/hashfn.h"#include "libpq/pqformat.h"#include "mb/pg_wchar.h"#include "nodes/nodeFuncs.h"#include "nodes/supportnodes.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/pg_locale.h"#include "utils/varlena.h"
Go to the source code of this file.
Definition at line 33 of file varchar.c.
References ArrayGetIntegerTypmods(), ereport, errcode(), errmsg(), ERROR, fb(), MaxAttrSize, and VARHDRSZ.
Referenced by bpchartypmodin(), and varchartypmodin().
Definition at line 72 of file varchar.c.
References palloc(), snprintf, and VARHDRSZ.
Referenced by bpchartypmodout(), and varchartypmodout().
Definition at line 670 of file varchar.c.
References arg, bpchartruelen(), VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
Referenced by bpchar_larger(), bpchar_smaller(), bpcharcmp(), bpchareq(), bpcharge(), bpchargt(), bpcharle(), bpcharlen(), bpcharlt(), bpcharne(), hashbpchar(), hashbpcharextended(), and internal_bpchar_pattern_compare().
| Datum bpchar | ( | PG_FUNCTION_ARGS | ) |
Definition at line 271 of file varchar.c.
References Assert, ereport, errcode(), errmsg(), ERROR, fb(), i, len, palloc(), PG_GETARG_BOOL, PG_GETARG_BPCHAR_PP, PG_GETARG_INT32, pg_mbcharcliplen(), pg_mbstrlen_with_len(), PG_RETURN_BPCHAR_P, SET_VARSIZE(), source, VARDATA(), VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
|
static |
Definition at line 130 of file varchar.c.
References ereturn, errcode(), errmsg(), fb(), j, len, palloc(), pg_mbcharcliplen(), pg_mbstrlen_with_len(), SET_VARSIZE(), VARDATA(), and VARHDRSZ.
Referenced by bpcharin(), and bpcharrecv().
| Datum bpchar_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 947 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_BPCHAR_P, VARDATA_ANY(), and varstr_cmp().
| Datum bpchar_name | ( | PG_FUNCTION_ARGS | ) |
Definition at line 371 of file varchar.c.
References fb(), len, NAMEDATALEN, NameStr, palloc0(), PG_GETARG_BPCHAR_PP, pg_mbcliplen(), PG_RETURN_NAME, VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
| Datum bpchar_pattern_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1163 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, and PG_RETURN_BOOL.
| Datum bpchar_pattern_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1179 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, and PG_RETURN_BOOL.
| Datum bpchar_pattern_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1147 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, and PG_RETURN_BOOL.
| Datum bpchar_pattern_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1131 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, and PG_RETURN_BOOL.
| Datum bpchar_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 965 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_BPCHAR_P, VARDATA_ANY(), and varstr_cmp().
| Datum bpchar_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 930 of file varchar.c.
References collid, fb(), MemoryContextSwitchTo(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_collation, SortSupportData::ssup_cxt, and varstr_sortsupport().
| Datum bpcharcmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 909 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_INT32, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpchar_ssup_cmp(), and gbt_bpcharcmp().
| Datum bpchareq | ( | PG_FUNCTION_ARGS | ) |
Definition at line 743 of file varchar.c.
References bcTruelen(), check_collation_set(), collid, fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, pg_newlocale_from_collation(), PG_RETURN_BOOL, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpchareq().
| Datum bpcharge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 888 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpcharge().
| Datum bpchargt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 867 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpchargt().
| Datum bpcharin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 198 of file varchar.c.
References bpchar_input(), fb(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, and PG_RETURN_BPCHAR_P.
| Datum bpcharle | ( | PG_FUNCTION_ARGS | ) |
Definition at line 846 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpcharle().
| Datum bpcharlen | ( | PG_FUNCTION_ARGS | ) |
Definition at line 693 of file varchar.c.
References arg, bcTruelen(), len, pg_database_encoding_max_length(), PG_GETARG_BPCHAR_PP, pg_mbstrlen_with_len(), PG_RETURN_INT32, and VARDATA_ANY().
| Datum bpcharlt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 825 of file varchar.c.
References bcTruelen(), cmp(), fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpcharlt().
| Datum bpcharne | ( | PG_FUNCTION_ARGS | ) |
Definition at line 784 of file varchar.c.
References bcTruelen(), check_collation_set(), collid, fb(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, pg_newlocale_from_collation(), PG_RETURN_BOOL, VARDATA_ANY(), and varstr_cmp().
| Datum bpcharoctetlen | ( | PG_FUNCTION_ARGS | ) |
Definition at line 709 of file varchar.c.
References arg, PG_GETARG_DATUM, PG_RETURN_INT32, toast_raw_datum_size(), and VARHDRSZ.
| Datum bpcharout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 219 of file varchar.c.
References fb(), PG_GETARG_DATUM, PG_RETURN_CSTRING, and TextDatumGetCString.
| Datum bpcharrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 230 of file varchar.c.
References bpchar_input(), buf, fb(), pfree(), PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_BPCHAR_P, pq_getmsgtext(), and str.
| Datum bpcharsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 251 of file varchar.c.
References textsend().
Definition at line 676 of file varchar.c.
Referenced by bcTruelen(), bpcharfastcmp_c(), varstr_abbrev_convert(), and varstrfastcmp_locale().
| Datum bpchartypmodin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 417 of file varchar.c.
References anychar_typmodin(), fb(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
| Datum bpchartypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 425 of file varchar.c.
References anychar_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
| Datum btbpchar_pattern_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1195 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, and PG_RETURN_INT32.
| Datum btbpchar_pattern_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1211 of file varchar.c.
References fb(), MemoryContextSwitchTo(), PG_GETARG_POINTER, PG_RETURN_VOID, SortSupportData::ssup_cxt, and varstr_sortsupport().
| Datum char_bpchar | ( | PG_FUNCTION_ARGS | ) |
Definition at line 353 of file varchar.c.
References palloc(), PG_GETARG_CHAR, PG_RETURN_BPCHAR_P, SET_VARSIZE(), VARDATA(), and VARHDRSZ.
Definition at line 727 of file varchar.c.
References collid, ereport, errcode(), errhint(), errmsg(), ERROR, fb(), and OidIsValid.
Referenced by bpchareq(), and bpcharne().
| Datum hashbpchar | ( | PG_FUNCTION_ARGS | ) |
Definition at line 988 of file varchar.c.
References bcTruelen(), buf, collid, elog, ereport, errcode(), errhint(), errmsg(), ERROR, fb(), hash_any(), palloc(), pfree(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, pg_newlocale_from_collation(), pg_strnxfrm(), and VARDATA_ANY().
| Datum hashbpcharextended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1044 of file varchar.c.
References bcTruelen(), buf, collid, elog, ereport, errcode(), errhint(), errmsg(), ERROR, fb(), hash_any_extended(), palloc(), pfree(), PG_FREE_IF_COPY, PG_GET_COLLATION, PG_GETARG_BPCHAR_PP, PG_GETARG_INT64, pg_newlocale_from_collation(), pg_strnxfrm(), and VARDATA_ANY().
Definition at line 1109 of file varchar.c.
References bcTruelen(), fb(), Min, and VARDATA_ANY().
Referenced by bpchar_pattern_ge(), bpchar_pattern_gt(), bpchar_pattern_le(), bpchar_pattern_lt(), and btbpchar_pattern_cmp().
| Datum name_bpchar | ( | PG_FUNCTION_ARGS | ) |
Definition at line 407 of file varchar.c.
References cstring_to_text(), NameStr, PG_GETARG_NAME, and PG_RETURN_BPCHAR_P.
| Datum varchar | ( | PG_FUNCTION_ARGS | ) |
Definition at line 609 of file varchar.c.
References cstring_to_text_with_len(), ereport, errcode(), errmsg(), ERROR, fb(), i, len, PG_GETARG_BOOL, PG_GETARG_INT32, PG_GETARG_VARCHAR_PP, pg_mbcharcliplen(), PG_RETURN_VARCHAR_P, source, VARDATA_ANY(), VARHDRSZ, and VARSIZE_ANY_EXHDR().
Referenced by main().
|
static |
Definition at line 457 of file varchar.c.
References cstring_to_text_with_len(), ereturn, errcode(), errmsg(), fb(), j, len, pg_mbcharcliplen(), and VARHDRSZ.
Referenced by varcharin(), and varcharrecv().
| Datum varchar_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 565 of file varchar.c.
References FuncExpr::args, Assert, DatumGetInt32(), exprTypmod(), fb(), IsA, linitial, list_length(), lsecond, PG_GETARG_POINTER, PG_RETURN_POINTER, relabel_to_typmod(), source, and VARHDRSZ.
| Datum varcharin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 495 of file varchar.c.
References fb(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_VARCHAR_P, and varchar_input().
| Datum varcharout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 516 of file varchar.c.
References fb(), PG_GETARG_DATUM, PG_RETURN_CSTRING, and TextDatumGetCString.
| Datum varcharrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 527 of file varchar.c.
References buf, fb(), pfree(), PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_VARCHAR_P, pq_getmsgtext(), str, and varchar_input().
| Datum varcharsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 548 of file varchar.c.
References textsend().
| Datum varchartypmodin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 648 of file varchar.c.
References anychar_typmodin(), fb(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
| Datum varchartypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 656 of file varchar.c.
References anychar_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.