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"
#include "utils/memutils.h"
#include "varatt.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 925 of file oracle_compat.c.
References Assert, data, 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 342 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 362 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 644 of file oracle_compat.c.
References dobyteatrim(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum byteartrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 671 of file oracle_compat.c.
References dobyteatrim(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum byteatrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 617 of file oracle_compat.c.
References dobyteatrim(), PG_GETARG_BYTEA_PP, and PG_RETURN_BYTEA_P.
Datum chr | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1006 of file oracle_compat.c.
References arg, encoding, ereport, errcode(), errmsg(), ERROR, GetDatabaseEncoding(), palloc(), pg_encoding_max_length(), PG_GETARG_INT32, PG_RETURN_TEXT_P, PG_UTF8, pg_utf8_islegal(), SET_VARSIZE, VARDATA, and VARHDRSZ.
Definition at line 534 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 378 of file oracle_compat.c.
References cstring_to_text_with_len(), i, len, 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 114 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 49 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(), bms_add_range(), calc_hist_selectivity_contained(), calc_hist_selectivity_contains(), check_new_partition_bound(), compute_range_stats(), create_range_bounds(), daterange_canonical(), enum_range_bounds(), enum_range_internal(), find_simplified_clause(), Generic_Text_IC_like(), geqo_randint(), getQuadrant(), gist_box_picksplit(), hash_multirange(), hash_multirange_extended(), hash_range(), hash_range_extended(), heap_inplace_update_and_unlock(), hyphenate(), int4range_canonical(), int8range_canonical(), iterate_word_similarity(), length_hist_bsearch(), make_empty_range(), make_one_partition_rbound(), make_range(), multirange_bsearch_match(), multirange_elem_bsearch_comparison(), multirange_get_bounds(), multirange_get_union_range(), multirange_lower(), multirange_lower_inc(), multirange_lower_inf(), multirange_range_contains_bsearch_comparison(), multirange_range_overlaps_bsearch_comparison(), multirange_upper(), multirange_upper_inc(), multirange_upper_inf(), multirangesel(), PageAddItemExtended(), range_constructor2(), range_constructor3(), range_contains_elem_internal(), range_deserialize(), range_gist_double_sorting_split(), range_in(), range_lower(), range_out(), range_recv(), range_send(), range_serialize(), range_upper(), rangesel(), rbound_bsearch(), spg_range_quad_inner_consistent(), trim_array(), XLogRecordAssemble(), and XLogSaveBufferForHint().
Datum lpad | ( | PG_FUNCTION_ARGS | ) |
Definition at line 147 of file oracle_compat.c.
References AllocSizeIsValid, ereport, errcode(), errmsg(), ERROR, len, palloc(), pg_add_s32_overflow(), pg_database_encoding_max_length(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mblen(), pg_mbstrlen_with_len(), pg_mul_s32_overflow(), PG_RETURN_TEXT_P, SET_VARSIZE, unlikely, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum ltrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 698 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 718 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 1121 of file oracle_compat.c.
References AllocSizeIsValid, 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.
Referenced by in_grouping(), in_grouping_b(), in_grouping_b_U(), in_grouping_U(), out_grouping(), out_grouping_b(), out_grouping_b_U(), and out_grouping_U().
Datum rpad | ( | PG_FUNCTION_ARGS | ) |
Definition at line 245 of file oracle_compat.c.
References AllocSizeIsValid, ereport, errcode(), errmsg(), ERROR, len, palloc(), pg_add_s32_overflow(), pg_database_encoding_max_length(), PG_GETARG_INT32, PG_GETARG_TEXT_PP, pg_mblen(), pg_mbstrlen_with_len(), pg_mul_s32_overflow(), PG_RETURN_TEXT_P, SET_VARSIZE, unlikely, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Datum rtrim | ( | PG_FUNCTION_ARGS | ) |
Definition at line 746 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 766 of file oracle_compat.c.
References dotrim(), PG_GETARG_TEXT_PP, PG_RETURN_TEXT_P, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Datum translate | ( | PG_FUNCTION_ARGS | ) |
Definition at line 797 of file oracle_compat.c.
References AllocSizeIsValid, ereport, errcode(), errmsg(), ERROR, i, len, palloc(), pg_add_s32_overflow(), pg_database_encoding_max_length(), PG_GETARG_TEXT_PP, pg_mblen(), pg_mul_s32_overflow(), PG_RETURN_TEXT_P, SET_VARSIZE, source, unlikely, VARDATA, VARDATA_ANY, VARHDRSZ, and VARSIZE_ANY_EXHDR.
Referenced by printQuery(), printTableAddCell(), and printTableAddHeader().
Datum upper | ( | PG_FUNCTION_ARGS | ) |
Definition at line 80 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(), bms_add_range(), calc_hist_selectivity_contained(), calc_hist_selectivity_contains(), check_new_partition_bound(), compactify_tuples(), compute_range_stats(), create_range_bounds(), cube_coord_llur(), daterange_canonical(), enum_range_bounds(), enum_range_internal(), find_simplified_clause(), g_cube_distance(), geqo_randint(), getQuadrant(), gist_box_picksplit(), hash_multirange(), hash_multirange_extended(), hash_range(), hash_range_extended(), heap_inplace_update_and_unlock(), hyphenate(), int4range_canonical(), int8range_canonical(), iterate_word_similarity(), length_hist_bsearch(), make_empty_range(), make_range(), multirange_bsearch_match(), multirange_elem_bsearch_comparison(), multirange_get_bounds(), multirange_get_union_range(), multirange_lower(), multirange_lower_inc(), multirange_lower_inf(), multirange_range_contains_bsearch_comparison(), multirange_range_overlaps_bsearch_comparison(), multirange_upper(), multirange_upper_inc(), multirange_upper_inf(), multirangesel(), PageAddItemExtended(), range_constructor2(), range_constructor3(), range_contains_elem_internal(), range_deserialize(), range_gist_double_sorting_split(), range_in(), range_lower(), range_out(), range_recv(), range_send(), range_serialize(), range_upper(), rangesel(), rbound_bsearch(), spg_range_quad_inner_consistent(), trim_array(), XLogRecordAssemble(), and XLogSaveBufferForHint().