PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "common/int.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/formatting.h"
Go to the source code of this file.
Functions | |
static text * | dotrim (const char *string, int stringlen, const char *set, int setlen, bool doltrim, bool dortrim) |
static bytea * | dobyteatrim (bytea *string, bytea *set, bool doltrim, bool dortrim) |
Datum | lower (PG_FUNCTION_ARGS) |
Datum | upper (PG_FUNCTION_ARGS) |
Datum | initcap (PG_FUNCTION_ARGS) |
Datum | lpad (PG_FUNCTION_ARGS) |
Datum | rpad (PG_FUNCTION_ARGS) |
Datum | btrim (PG_FUNCTION_ARGS) |
Datum | btrim1 (PG_FUNCTION_ARGS) |
Datum | byteatrim (PG_FUNCTION_ARGS) |
Datum | bytealtrim (PG_FUNCTION_ARGS) |
Datum | byteartrim (PG_FUNCTION_ARGS) |
Datum | ltrim (PG_FUNCTION_ARGS) |
Datum | ltrim1 (PG_FUNCTION_ARGS) |
Datum | rtrim (PG_FUNCTION_ARGS) |
Datum | rtrim1 (PG_FUNCTION_ARGS) |
Datum | translate (PG_FUNCTION_ARGS) |
Datum | ascii (PG_FUNCTION_ARGS) |
Datum | chr (PG_FUNCTION_ARGS) |
Datum | repeat (PG_FUNCTION_ARGS) |
Datum ascii | ( | PG_FUNCTION_ARGS | ) |
Definition at line 919 of file oracle_compat.c.
References Assert, encoding, ereport, errcode(), errmsg(), ERROR, GetDatabaseEncoding(), i, pg_encoding_max_length(), PG_GETARG_TEXT_PP, PG_RETURN_INT32, PG_UTF8, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by float4out(), float8out_internal(), and pg_to_ascii().
Datum btrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 338 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum btrim1 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 358 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum bytealtrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 640 of file oracle_compat.c.
References dobyteatrim(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum byteartrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 667 of file oracle_compat.c.
References dobyteatrim(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum byteatrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 613 of file oracle_compat.c.
References dobyteatrim(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum chr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1000 of file oracle_compat.c.
References generate_unaccent_rules::bytes(), encoding, ereport, errcode(), errmsg(), ERROR, GetDatabaseEncoding(), palloc(), pg_encoding_max_length(), PG_GETARG_UINT32, PG_RETURN_TEXT_P, PG_UTF8, pg_utf8_islegal(), SET_VARSIZE, VARDATA, and VARHDRSZ.
Definition at line 530 of file oracle_compat.c.
References palloc(), SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by bytealtrim(), byteartrim(), and byteatrim().
|
static |
Definition at line 374 of file oracle_compat.c.
References cstring_to_text_with_len(), i, palloc(), pfree(), pg_database_encoding_max_length(), and pg_mblen().
Referenced by btrim(), btrim1(), ltrim(), ltrim1(), rtrim(), and rtrim1().
Datum initcap | ( | PG_FUNCTION_ARGS | ) |
Definition at line 111 of file oracle_compat.c.
References cstring_to_text(), pfree(), PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, str_initcap(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum lower | ( | PG_FUNCTION_ARGS | ) |
Definition at line 46 of file oracle_compat.c.
References cstring_to_text(), pfree(), PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, str_tolower(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by _hash_binsearch(), _hash_binsearch_last(), check_new_partition_bound(), compute_range_stats(), create_range_bounds(), daterange_canonical(), enum_range_bounds(), Generic_Text_IC_like(), getQuadrant(), gist_box_picksplit(), hash_multirange(), hash_multirange_extended(), hash_range(), hash_range_extended(), hyphenate(), int4range_canonical(), int8range_canonical(), iterate_word_similarity(), length_hist_bsearch(), make_empty_range(), make_one_partition_rbound(), multirange_bsearch_match(), multirange_get_union_range(), multirange_lower(), multirange_lower_inc(), multirange_lower_inf(), multirange_upper(), multirange_upper_inc(), multirange_upper_inf(), multirangesel(), PageAddItemExtended(), range_constructor2(), range_constructor3(), range_contains_elem_internal(), range_gist_double_sorting_split(), range_in(), range_lower(), range_out(), range_recv(), range_send(), range_upper(), rangesel(), rbound_bsearch(), spg_range_quad_inner_consistent(), trim_array(), XLogRecordAssemble(), and XLogSaveBufferForHint().
Datum lpad | ( | PG_FUNCTION_ARGS | ) |
Definition at line 144 of file oracle_compat.c.
References ereport, errcode(), errmsg(), ERROR, palloc(), pg_database_encoding_max_length(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mblen(), pg_mbstrlen_with_len(), PG_RETURN_TEXT_P, SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum ltrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 694 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum ltrim1 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 714 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum repeat | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1108 of file oracle_compat.c.
References CHECK_FOR_INTERRUPTS, ereport, errcode(), errmsg(), ERROR, i, palloc(), pg_add_s32_overflow(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mul_s32_overflow(), PG_RETURN_TEXT_P, SET_VARSIZE, unlikely, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum rpad | ( | PG_FUNCTION_ARGS | ) |
Definition at line 242 of file oracle_compat.c.
References ereport, errcode(), errmsg(), ERROR, palloc(), pg_database_encoding_max_length(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mblen(), pg_mbstrlen_with_len(), PG_RETURN_TEXT_P, SET_VARSIZE, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum rtrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 742 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum rtrim1 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 762 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by gbt_bpchar_compress(), and gbt_bpchar_consistent().
Datum translate | ( | PG_FUNCTION_ARGS | ) |
Definition at line 793 of file oracle_compat.c.
References ereport, errcode(), errmsg(), ERROR, i, palloc(), pg_database_encoding_max_length(), PG_GETARG_TEXT_PP, pg_mblen(), PG_RETURN_TEXT_P, SET_VARSIZE, source, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by printQuery().
Datum upper | ( | PG_FUNCTION_ARGS | ) |
Definition at line 77 of file oracle_compat.c.
References cstring_to_text(), pfree(), PG_GET_COLLATION, PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, str_toupper(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by _hash_binsearch(), _hash_binsearch_last(), check_new_partition_bound(), compactify_tuples(), compute_range_stats(), create_range_bounds(), cube_coord_llur(), daterange_canonical(), enum_range_bounds(), g_cube_distance(), getQuadrant(), gist_box_picksplit(), hash_multirange(), hash_multirange_extended(), hash_range(), hash_range_extended(), hyphenate(), int4range_canonical(), int8range_canonical(), iterate_word_similarity(), length_hist_bsearch(), make_empty_range(), multirange_bsearch_match(), multirange_get_union_range(), multirange_lower(), multirange_lower_inc(), multirange_lower_inf(), multirange_upper(), multirange_upper_inc(), multirange_upper_inf(), multirangesel(), PageAddItemExtended(), range_constructor2(), range_constructor3(), range_contains_elem_internal(), range_gist_double_sorting_split(), range_in(), range_lower(), range_out(), range_recv(), range_send(), range_upper(), rangesel(), rbound_bsearch(), spg_range_quad_inner_consistent(), trim_array(), XLogRecordAssemble(), and XLogSaveBufferForHint().