|
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 673 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, ereturn, errcode(), errmsg, fb(), i, len, memcpy(), palloc(), PG_GETARG_BOOL, PG_GETARG_BPCHAR_PP, PG_GETARG_INT32, pg_mbcharcliplen(), pg_mbstrlen_with_len(), PG_RETURN_BPCHAR_P, result, 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, memcpy(), palloc(), pg_mbcharcliplen(), pg_mbstrlen_with_len(), result, SET_VARSIZE(), VARDATA(), and VARHDRSZ.
Referenced by bpcharin(), and bpcharrecv().
| Datum bpchar_larger | ( | PG_FUNCTION_ARGS | ) |
Definition at line 950 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 373 of file varchar.c.
References fb(), len, memcpy(), NAMEDATALEN, NameStr, palloc0(), PG_GETARG_BPCHAR_PP, pg_mbcliplen(), PG_RETURN_NAME, result, VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
| Datum bpchar_pattern_ge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1166 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, and result.
| Datum bpchar_pattern_gt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1182 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, and result.
| Datum bpchar_pattern_le | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1150 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, and result.
| Datum bpchar_pattern_lt | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1134 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, PG_RETURN_BOOL, and result.
| Datum bpchar_smaller | ( | PG_FUNCTION_ARGS | ) |
Definition at line 968 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 933 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 912 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 746 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, result, VARDATA_ANY(), and varstr_cmp().
Referenced by gbt_bpchareq().
| Datum bpcharge | ( | PG_FUNCTION_ARGS | ) |
Definition at line 891 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 870 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, PG_RETURN_BPCHAR_P, and result.
| Datum bpcharle | ( | PG_FUNCTION_ARGS | ) |
Definition at line 849 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 696 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 828 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 787 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, result, VARDATA_ANY(), and varstr_cmp().
| Datum bpcharoctetlen | ( | PG_FUNCTION_ARGS | ) |
Definition at line 712 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(), result, and str.
| Datum bpcharsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 251 of file varchar.c.
References textsend().
Definition at line 679 of file varchar.c.
Referenced by bcTruelen(), bpcharfastcmp_c(), varstr_abbrev_convert(), and varstrfastcmp_locale().
| Datum bpchartypmodin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 420 of file varchar.c.
References anychar_typmodin(), fb(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
| Datum bpchartypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 428 of file varchar.c.
References anychar_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.
| Datum btbpchar_pattern_cmp | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1198 of file varchar.c.
References fb(), internal_bpchar_pattern_compare(), PG_FREE_IF_COPY, PG_GETARG_BPCHAR_PP, PG_RETURN_INT32, and result.
| Datum btbpchar_pattern_sortsupport | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1214 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 354 of file varchar.c.
References palloc(), PG_GETARG_CHAR, PG_RETURN_BPCHAR_P, result, SET_VARSIZE(), VARDATA(), and VARHDRSZ.
Definition at line 730 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 991 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(), result, and VARDATA_ANY().
| Datum hashbpcharextended | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1047 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(), result, and VARDATA_ANY().
Definition at line 1112 of file varchar.c.
References bcTruelen(), fb(), Min, result, 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 410 of file varchar.c.
References cstring_to_text(), NameStr, PG_GETARG_NAME, PG_RETURN_BPCHAR_P, and result.
| Datum varchar | ( | PG_FUNCTION_ARGS | ) |
Definition at line 612 of file varchar.c.
References cstring_to_text_with_len(), ereturn, errcode(), errmsg, 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 460 of file varchar.c.
References cstring_to_text_with_len(), ereturn, errcode(), errmsg, fb(), j, len, pg_mbcharcliplen(), result, and VARHDRSZ.
Referenced by varcharin(), and varcharrecv().
| Datum varchar_support | ( | PG_FUNCTION_ARGS | ) |
Definition at line 568 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 498 of file varchar.c.
References fb(), PG_GETARG_CSTRING, PG_GETARG_INT32, PG_GETARG_OID, PG_RETURN_VARCHAR_P, result, and varchar_input().
| Datum varcharout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 519 of file varchar.c.
References fb(), PG_GETARG_DATUM, PG_RETURN_CSTRING, and TextDatumGetCString.
| Datum varcharrecv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 530 of file varchar.c.
References buf, fb(), pfree(), PG_GETARG_INT32, PG_GETARG_OID, PG_GETARG_POINTER, PG_RETURN_VARCHAR_P, pq_getmsgtext(), result, str, and varchar_input().
| Datum varcharsend | ( | PG_FUNCTION_ARGS | ) |
Definition at line 551 of file varchar.c.
References textsend().
| Datum varchartypmodin | ( | PG_FUNCTION_ARGS | ) |
Definition at line 651 of file varchar.c.
References anychar_typmodin(), fb(), PG_GETARG_ARRAYTYPE_P, and PG_RETURN_INT32.
| Datum varchartypmodout | ( | PG_FUNCTION_ARGS | ) |
Definition at line 659 of file varchar.c.
References anychar_typmodout(), PG_GETARG_INT32, and PG_RETURN_CSTRING.