PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | MAXINT8LEN 20 |
#define | CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s)) |
#define | TextDatumGetCString(d) text_to_cstring((text *) DatumGetPointer(d)) |
#define | FORMAT_TYPE_TYPEMOD_GIVEN 0x01 /* typemod defined by caller */ |
#define | FORMAT_TYPE_ALLOW_INVALID 0x02 /* allow invalid types */ |
#define | FORMAT_TYPE_FORCE_QUALIFY 0x04 /* force qualification of type */ |
#define | FORMAT_TYPE_INVALID_AS_NULL 0x08 /* NULL if undefined */ |
Functions | |
bool | parse_bool (const char *value, bool *result) |
bool | parse_bool_with_len (const char *value, size_t len, bool *result) |
void | domain_check (Datum value, bool isnull, Oid domainType, void **extra, MemoryContext mcxt) |
int | errdatatype (Oid datatypeOid) |
int | errdomainconstraint (Oid datatypeOid, const char *conname) |
int2vector * | buildint2vector (const int16 *int2s, int n) |
void | namestrcpy (Name name, const char *str) |
int | namestrcmp (Name name, const char *str) |
int32 | pg_atoi (const char *s, int size, int c) |
int16 | pg_strtoint16 (const char *s) |
int32 | pg_strtoint32 (const char *s) |
int | pg_itoa (int16 i, char *a) |
int | pg_ultoa_n (uint32 l, char *a) |
int | pg_ulltoa_n (uint64 l, char *a) |
int | pg_ltoa (int32 l, char *a) |
int | pg_lltoa (int64 ll, char *a) |
char * | pg_ultostr_zeropad (char *str, uint32 value, int32 minwidth) |
char * | pg_ultostr (char *str, uint32 value) |
uint64 | pg_strtouint64 (const char *str, char **endptr, int base) |
oidvector * | buildoidvector (const Oid *oids, int n) |
Oid | oidparse (Node *node) |
int | oid_cmp (const void *p1, const void *p2) |
char * | regexp_fixed_prefix (text *text_re, bool case_insensitive, Oid collation, bool *exact) |
const char * | quote_identifier (const char *ident) |
char * | quote_qualified_identifier (const char *qualifier, const char *ident) |
void | generate_operator_clause (fmStringInfo buf, const char *leftop, Oid leftoptype, Oid opoid, const char *rightop, Oid rightoptype) |
int | bpchartruelen (char *s, int len) |
text * | cstring_to_text (const char *s) |
text * | cstring_to_text_with_len (const char *s, int len) |
char * | text_to_cstring (const text *t) |
void | text_to_cstring_buffer (const text *src, char *dst, size_t dst_len) |
int | xidComparator (const void *arg1, const void *arg2) |
char * | pg_inet_cidr_ntop (int af, const void *src, int bits, char *dst, size_t size) |
int | pg_inet_net_pton (int af, const char *src, void *dst, size_t size) |
double | convert_network_to_scalar (Datum value, Oid typid, bool *failure) |
Datum | network_scan_first (Datum in) |
Datum | network_scan_last (Datum in) |
void | clean_ipv6_addr (int addr_family, char *addr) |
Datum | numeric_float8_no_overflow (PG_FUNCTION_ARGS) |
char * | format_type_extended (Oid type_oid, int32 typemod, bits16 flags) |
char * | format_type_be (Oid type_oid) |
char * | format_type_be_qualified (Oid type_oid) |
char * | format_type_with_typemod (Oid type_oid, int32 typemod) |
int32 | type_maximum_size (Oid type_oid, int32 typemod) |
char * | quote_literal_cstr (const char *rawstr) |
Variables | |
bool | quote_all_identifiers |
#define CStringGetTextDatum | ( | s | ) | PointerGetDatum(cstring_to_text(s)) |
Definition at line 82 of file builtins.h.
Referenced by aclexplode(), AggregateCreate(), AlterDomainDefault(), AlterForeignServer(), AlterPolicy(), AlterRole(), AlterSubscription(), ApplyExtensionUpdates(), assign_text_var(), autoinc(), brin_metapage_info(), brin_page_items(), bt_page_print_tuples(), CreateComments(), CreateConstraintEntry(), CreateForeignServer(), CreatePolicy(), CreateReplicationSlot(), CreateRole(), CreateSharedComments(), CreateSubscription(), CreateTrigger(), dblink_get_connections(), dblink_get_notify(), deflist_to_tuplestore(), each_object_field_end(), elements_array_element_end(), exec_eval_using_params(), execute_extension_script(), extract_variadic_args(), fill_hba_line(), get_altertable_subcmdtypes(), get_available_versions_for_extension(), gethba_options(), GetSecurityLabel(), GetSharedSecurityLabel(), gin_page_opaque_info(), gist_page_items(), gist_page_opaque_info(), GUCArrayAdd(), heap_page_items(), heap_tuple_infomask_flags(), IdentifySystem(), insert_username(), InsertExtensionTuple(), InsertRule(), interpret_function_parameter_list(), json_object(), json_object_keys(), json_object_two_arg(), jsonb_object_keys(), page_header(), parse_ident(), pg_available_extensions(), pg_control_checkpoint(), pg_cursor(), pg_event_trigger_ddl_commands(), pg_event_trigger_dropped_objects(), pg_extension_update_paths(), pg_get_replication_slots(), pg_get_shmem_allocations(), pg_identify_object(), pg_identify_object_as_address(), pg_indexam_progress_phasename(), pg_listening_channels(), pg_lock_status(), pg_ls_dir(), pg_ls_dir_files(), pg_prepared_statement(), pg_prepared_xact(), pg_show_replication_origin_status(), pg_stat_get_activity(), pg_stat_get_archiver(), pg_stat_get_wal_receiver(), pg_stat_get_wal_senders(), pg_stat_statements_internal(), pg_stop_backup_v2(), pg_timezone_abbrevs(), pg_timezone_names(), pg_walfile_name_offset(), plpgsql_fulfill_promise(), postgres_fdw_get_connections(), ProcedureCreate(), publicationListToArray(), PutMemoryContextsStatsTupleStore(), recordMultipleDependencies(), replorigin_by_name(), replorigin_create(), report_corruption(), SetSecurityLabel(), SetSharedSecurityLabel(), ssl_extension_info(), StartReplication(), StoreAttrDefault(), StorePartitionBound(), StorePartitionKey(), string_to_datum(), strlist_to_textarray(), ts_lexize(), ttdummy(), TypeCreate(), UpdateIndexRelation(), visitDependenciesOf(), and VXIDGetDatum().
#define FORMAT_TYPE_ALLOW_INVALID 0x02 /* allow invalid types */ |
Definition at line 109 of file builtins.h.
Referenced by array_recv(), format_type(), format_type_extended(), oidvectortypes(), and record_recv().
#define FORMAT_TYPE_FORCE_QUALIFY 0x04 /* force qualification of type */ |
Definition at line 110 of file builtins.h.
Referenced by deparse_type_name(), format_type_be_qualified(), format_type_extended(), and getObjectIdentityParts().
#define FORMAT_TYPE_INVALID_AS_NULL 0x08 /* NULL if undefined */ |
Definition at line 111 of file builtins.h.
Referenced by format_type_extended(), getObjectDescription(), and getObjectIdentityParts().
#define FORMAT_TYPE_TYPEMOD_GIVEN 0x01 /* typemod defined by caller */ |
Definition at line 108 of file builtins.h.
Referenced by deparse_type_name(), format_type(), format_type_extended(), and format_type_with_typemod().
#define MAXINT8LEN 20 |
Definition at line 22 of file builtins.h.
Referenced by int8out(), and printsimple().
#define TextDatumGetCString | ( | d | ) | text_to_cstring((text *) DatumGetPointer(d)) |
Definition at line 83 of file builtins.h.
Referenced by AlterDomainValidateConstraint(), AlterPolicy(), ATExecValidateConstraint(), AttrDefaultFetch(), binary_decode(), binary_encode(), binary_upgrade_create_empty_extension(), bpcharout(), build_function_result_tupdesc_d(), CheckConstraintFetch(), CloneRowTriggersToPartition(), compile_plperl_function(), compile_pltcl_function(), convert_string_datum(), DecodeTextArrayToBitmapset(), decompile_conbin(), DefineDomain(), do_compile(), DropSubscription(), exec_stmt_close(), exec_stmt_fetch(), exec_stmt_forc(), exec_stmt_open(), fetch_cursor_param_value(), fetch_function_defaults(), fetch_remote_table_info(), fetch_table_list(), fmgr_c_validator(), fmgr_info_C_lang(), fmgr_info_cxt_security(), fmgr_internal_validator(), fmgr_sql_validator(), fmgr_symbol(), func_get_detail(), generate_partition_qual(), generateClonedIndexStmt(), GenerateTypeDependencies(), get_func_arg_info(), get_func_input_arg_names(), get_func_result_name(), get_func_sql_syntax(), get_jsonb_path_all(), get_path_all(), get_qual_for_range(), get_reloptions(), get_role_password(), get_text_array_contents(), get_typdefault(), GetAggInitVal(), GetComment(), GetForeignServerExtended(), GetSecurityLabel(), GetSharedSecurityLabel(), GetSubscription(), GUCArrayAdd(), GUCArrayDelete(), GUCArrayReset(), index_concurrently_create_copy(), init_sql_fcache(), inline_function(), inline_set_returning_function(), json_object(), json_object_two_arg(), json_out(), jsonb_object(), jsonb_object_two_arg(), like_fixed_prefix(), load_domaintype_info(), make_greater_string(), MergeWithExistingConstraint(), metaphone(), parse_key_value_arrays(), parseRelOptionsInternal(), pg_get_constraintdef_worker(), pg_get_function_arg_default(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_object_address(), pg_get_partkeydef_worker(), pg_get_triggerdef_worker(), pg_logical_slot_get_changes_guts(), PLy_procedure_create(), print_function_arguments(), ProcedureCreate(), ProcessGUCArray(), regex_fixed_prefix(), RelationBuildPartitionDesc(), RelationBuildPartitionKey(), RelationBuildRowSecurity(), RelationBuildRuleLock(), RelationBuildTriggers(), RelationGetDummyIndexExpressions(), RelationGetIndexAttrBitmap(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), RemoveRoleFromObjectPolicy(), RenameRole(), sepgsql_restorecon(), sepgsql_setcon(), set_config_by_name(), setPathArray(), show_config_by_name(), show_config_by_name_missing_ok(), SPI_sql_row_to_xmlelement(), textarray_to_stringlist(), textarray_to_strvaluelist(), textout(), tfuncInitialize(), untransformRelOptions(), varcharout(), and visitDependenciesOf().
int bpchartruelen | ( | char * | s, |
int | len | ||
) |
Definition at line 671 of file varchar.c.
References i.
Referenced by bcTruelen(), bpcharfastcmp_c(), varstr_abbrev_convert(), and varstrfastcmp_locale().
int2vector* buildint2vector | ( | const int16 * | int2s, |
int | n | ||
) |
Definition at line 114 of file int.c.
References int2vector::dataoffset, int2vector::dim1, int2vector::elemtype, Int2VectorSize, int2vector::lbound1, int2vector::ndim, palloc0(), SET_VARSIZE, and int2vector::values.
Referenced by CreateStatistics(), CreateTrigger(), StorePartitionKey(), and UpdateIndexRelation().
Definition at line 167 of file oid.c.
References oidvector::dataoffset, oidvector::dim1, oidvector::elemtype, oidvector::lbound1, oidvector::ndim, OidVectorSize, palloc0(), SET_VARSIZE, and oidvector::values.
Referenced by DefineAggregate(), interpret_function_parameter_list(), makeMultirangeConstructors(), makeRangeConstructors(), StorePartitionKey(), and UpdateIndexRelation().
void clean_ipv6_addr | ( | int | addr_family, |
char * | addr | ||
) |
Definition at line 2118 of file network.c.
Referenced by fill_hba_line(), inet_client_addr(), inet_server_addr(), pg_stat_get_activity(), and pg_stat_get_backend_client_addr().
Definition at line 1517 of file network.c.
References macaddr::a, macaddr8::a, macaddr::b, macaddr8::b, macaddr::c, macaddr8::c, macaddr::d, macaddr8::d, DatumGetInetPP, DatumGetMacaddr8P, DatumGetMacaddrP, macaddr::e, macaddr8::e, macaddr::f, macaddr8::f, macaddr8::g, macaddr8::h, i, ip_addr, ip_family, and PGSQL_AF_INET.
Referenced by convert_to_scalar(), gbt_inet_compress(), and gbt_inet_consistent().
text* cstring_to_text | ( | const char * | s | ) |
Definition at line 189 of file varlena.c.
References cstring_to_text_with_len().
Referenced by array_dims(), ASN1_STRING_to_text(), booltext(), brin_page_type(), build_test_info_result(), build_test_match_result(), cash_words(), cidr_abbrev(), convert_charset(), cstring_to_xmltype(), current_query(), datetime_to_char_body(), dblink_build_sql_delete(), dblink_build_sql_insert(), dblink_build_sql_update(), dblink_cancel_query(), dblink_close(), dblink_connect(), dblink_disconnect(), dblink_error_message(), dblink_exec(), dblink_open(), dmetaphone(), dmetaphone_alt(), exec_assign_c_string(), executeDateTimeMethod(), filter_list_to_array(), format_type(), get_command_tag(), get_command_type(), get_jsonb_path_all(), get_scalar(), hash_page_type(), hstore_to_json(), hstore_to_json_loose(), inet_abbrev(), initcap(), json_in(), json_typeof(), jsonb_typeof(), JsonbValueAsText(), lower(), md5_bytea(), md5_text(), metaphone(), name_bpchar(), name_text(), network_host(), network_show(), oidvectortypes(), pg_collation_actual_version(), pg_collation_for(), pg_crypt(), pg_current_logfile(), pg_describe_object(), pg_export_snapshot(), pg_relation_filepath(), pg_size_pretty(), pg_size_pretty_numeric(), pg_stat_get_backend_activity(), pg_stat_get_backend_wait_event(), pg_stat_get_backend_wait_event_type(), pg_stat_get_replication_slots(), pg_stat_get_slru(), pg_stats_ext_mcvlist_items(), pg_tablespace_location(), pg_walfile_name(), pg_xact_status(), pgsql_version(), pgxml_result_to_text(), quote_ident(), quote_ident_cstr(), quote_nullable(), sepgsql_getcon(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), set_config_by_name(), show_all_file_settings(), show_config_by_name(), show_config_by_name_missing_ok(), ShowAllGUCConfig(), soundex(), SPI_sql_row_to_xmlelement(), split_part(), ssl_cipher(), ssl_client_dn(), ssl_issuer_dn(), ssl_version(), string_to_text(), text_substring(), textin(), timeofday(), to_hex32(), to_hex64(), tsquerytree(), unaccent_dict(), upper(), xml_encode_special_chars(), xml_in(), and xml_recv().
text* cstring_to_text_with_len | ( | const char * | s, |
int | len | ||
) |
Definition at line 201 of file varlena.c.
References palloc(), SET_VARSIZE, VARDATA, and VARHDRSZ.
Referenced by array_to_json(), array_to_json_pretty(), array_to_text_internal(), build_regexp_match_result(), build_regexp_split_result(), build_test_match_result(), compute_tsvector_stats(), concat_internal(), cstring_to_text(), cstring_to_xmltype(), do_text_output_multiline(), dotrim(), each_object_field_end(), each_worker_jsonb(), elements_array_element_end(), ExecEvalXmlExpr(), executeDateTimeMethod(), executeLikeRegex(), fsm_page_contents(), get_array_element_end(), get_array_end(), get_object_end(), get_object_field_end(), get_scalar(), gin_extract_tsquery(), gin_extract_tsvector(), hstore_akeys(), hstore_avals(), hstore_each(), hstore_fetchval(), hstore_skeys(), hstore_slice_to_array(), hstore_subscript_fetch(), hstore_svals(), hstore_to_array_internal(), hstore_to_json(), hstore_to_json_loose(), json_build_array(), json_build_array_noargs(), json_build_object(), json_build_object_noargs(), json_object(), json_object_two_arg(), json_recv(), json_strip_nulls(), jsonb_pretty(), JsonbValueAsText(), leftmostvalue_text(), LogicalOutputWrite(), parse_ident(), pg_gen_salt(), pg_gen_salt_rounds(), replace_text(), replace_text_regexp(), row_to_json(), row_to_json_pretty(), serialize_deflist(), split_part(), split_text(), ssl_extension_info(), string_agg_finalfn(), stringinfo_to_xmltype(), text_format(), text_left(), text_right(), textrecv(), to_json(), transform_json_string_values(), tsquerytree(), tsvector_to_array(), tsvector_unnest(), varchar(), varchar_input(), and xslt_process().
void domain_check | ( | Datum | value, |
bool | isnull, | ||
Oid | domainType, | ||
void ** | extra, | ||
MemoryContext | mcxt | ||
) |
Definition at line 327 of file domains.c.
References CurrentMemoryContext, domain_check_input(), domain_state_setup(), and DomainIOData::domain_type.
Referenced by check_domain_for_new_field(), check_domain_for_new_tuple(), expanded_record_set_fields(), hstore_populate_record(), plperl_return_next_internal(), plperl_sv_to_datum(), plpgsql_exec_function(), pltcl_build_tuple_result(), PLyObject_ToDomain(), populate_composite(), populate_domain(), and populate_recordset_record().
int errdatatype | ( | Oid | datatypeOid | ) |
Definition at line 360 of file domains.c.
References elog, err_generic_string(), ERROR, get_namespace_name(), GETSTRUCT, HeapTupleIsValid, NameStr, ObjectIdGetDatum, PG_DIAG_DATATYPE_NAME, PG_DIAG_SCHEMA_NAME, ReleaseSysCache(), SearchSysCache1(), and TYPEOID.
Referenced by domain_check_input(), errdomainconstraint(), and ExecEvalConstraintNotNull().
int errdomainconstraint | ( | Oid | datatypeOid, |
const char * | conname | ||
) |
Definition at line 384 of file domains.c.
References err_generic_string(), errdatatype(), and PG_DIAG_CONSTRAINT_NAME.
Referenced by domain_check_input(), and ExecEvalConstraintCheck().
char* format_type_be | ( | Oid | type_oid | ) |
Definition at line 339 of file format_type.c.
References format_type_extended().
Referenced by aclcheck_error_type(), addFamilyMember(), addRangeTableEntryForFunction(), AggregateCreate(), AlterType(), AlterTypeNamespace(), AlterTypeNamespace_oid(), AlterTypeNamespaceInternal(), AlterTypeOwner(), appendTypeNameToBuffer(), array_cat(), array_cmp(), array_contain_compare(), array_eq(), array_position_common(), array_positions(), array_recv(), array_replace_internal(), array_send(), assign_record_type_identifier(), ATAddForeignKeyConstraint(), ATExecAlterColumnType(), ATExecSetStorage(), ATPrepAlterColumnType(), brinvalidate(), btvalidate(), build_attrmap_by_name(), build_column_default(), build_datatype(), build_pertrans_for_aggref(), build_subplan(), CastCreate(), check_object_ownership(), check_of_type(), check_safe_enum_use(), check_sql_fn_retval(), check_valid_polymorphic_signature(), CheckAttributeType(), checkDomainOwner(), checkEnumOwner(), checkRuleResultList(), CheckVarSlotCompatibility(), coerce_record_to_complex(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), coerce_type(), compare_values_of_enum(), compile_plperl_function(), compile_pltcl_function(), ComputeIndexAttrs(), ComputePartitionAttrs(), cookDefault(), create_ctas_nodata(), CreateCast(), CreateFunction(), CreateStatistics(), CreateTransform(), DefineAggregate(), DefineDomain(), DefineRange(), DefineType(), do_compile(), domain_check_input(), domain_state_setup(), dropOperators(), dropProcedures(), enforce_generic_type_consistency(), enum_first(), enum_in(), enum_last(), enum_recv(), EvaluateParams(), exec_stmt_foreach_a(), ExecCheckPlanOutput(), ExecEvalArrayExpr(), ExecEvalConstraintCheck(), ExecEvalConstraintNotNull(), ExecEvalFieldSelect(), ExecEvalParamExtern(), ExecEvalWholeRowVar(), ExecInitExprRec(), ExecInitSubscriptingRef(), exprType(), fetch_cursor_param_value(), findRangeSubOpclass(), findTypeInputFunction(), findTypeReceiveFunction(), fmgr_sql_validator(), format_operator_extended(), format_procedure_extended(), funcname_signature_string(), get_cast_oid(), get_domain_constraint_oid(), get_expr_result_tupdesc(), get_multirange_io_data(), get_range_io_data(), get_rels_with_domain(), get_sort_group_operators(), get_transform_oid(), get_ts_parser_func(), get_ts_template_func(), GetColumnDefCollation(), GetDefaultOpClass(), getObjectDescription(), getTypeBinaryInputInfo(), getTypeBinaryOutputInfo(), getTypeInputInfo(), getTypeOutputInfo(), hash_array(), hash_array_extended(), hash_multirange(), hash_multirange_extended(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), hashvalidate(), init_params(), initArrayResultArr(), initGinState(), internal_get_result_type(), intorel_startup(), load_enum_cache_data(), logicalrep_typmap_gettypname(), lookup_rowtype_tupdesc_domain(), lookup_rowtype_tupdesc_internal(), LookupTypeNameExtended(), make_expanded_record_from_tupdesc(), make_expanded_record_from_typeid(), make_row_comparison_op(), make_scalar_array_op(), op_signature_string(), ParseFuncOrColumn(), pg_collation_for(), plperl_array_to_datum(), plperl_sv_to_datum(), plperl_validator(), plpgsql_build_variable(), plpgsql_param_eval_generic(), plpgsql_param_eval_generic_ro(), plpgsql_param_eval_recfield(), plpgsql_validator(), PLy_procedure_create(), prepare_sql_fn_parse_info(), print_function_arguments(), print_function_rettype(), print_function_trftypes(), processIndirection(), record_cmp(), record_eq(), record_image_cmp(), record_image_eq(), regtypeout(), RelationBuildPartitionKey(), RenameConstraintById(), RenameType(), resolve_anyarray_from_others(), resolve_anyelement_from_others(), resolve_anymultirange_from_others(), resolve_anyrange_from_others(), ResolveOpClass(), revalidate_rectypeid(), ri_HashCompareOp(), satisfies_hash_partition(), select_common_type(), select_common_type_from_oids(), slot_store_error_callback(), spgvalidate(), storeOperators(), storeProcedures(), transformAggregateCall(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCollateClause(), transformColumnType(), transformContainerSubscripts(), transformFrameOffset(), transformPartitionBoundValue(), transformPLAssignStmt(), transformTypeCast(), transformXmlSerialize(), tuple_to_stringinfo(), tupledesc_match(), tuples_equal(), unknown_attribute(), validateConnectbyTupleDesc(), variable_coerce_param_hook(), and width_bucket_array().
char* format_type_be_qualified | ( | Oid | type_oid | ) |
Definition at line 349 of file format_type.c.
References format_type_extended(), and FORMAT_TYPE_FORCE_QUALIFY.
Referenced by format_operator_extended(), format_operator_parts(), format_procedure_extended(), format_procedure_parts(), and getObjectIdentityParts().
Definition at line 112 of file format_type.c.
References buf, elog, ERROR, FORMAT_TYPE_ALLOW_INVALID, FORMAT_TYPE_FORCE_QUALIFY, FORMAT_TYPE_INVALID_AS_NULL, FORMAT_TYPE_TYPEMOD_GIVEN, get_namespace_name_or_temp(), GETSTRUCT, HeapTupleIsValid, InvalidOid, NameStr, ObjectIdGetDatum, printTypmod(), psprintf(), pstrdup(), quote_qualified_identifier(), ReleaseSysCache(), SearchSysCache1(), TypeIsVisible(), TYPEOID, and typname.
Referenced by array_recv(), deparse_type_name(), format_type(), format_type_be(), format_type_be_qualified(), format_type_with_typemod(), getObjectDescription(), getObjectIdentityParts(), lookup_am_handler_func(), oidvectortypes(), and record_recv().
Definition at line 358 of file format_type.c.
References format_type_extended(), and FORMAT_TYPE_TYPEMOD_GIVEN.
Referenced by analyzeCTE(), ATPrepAlterColumnType(), build_attrmap_by_position(), checkRuleResultList(), checkViewTupleDesc(), compatConnectbyTupleDescs(), get_coercion_expr(), get_const_expr(), get_from_clause_coldeflist(), get_rule_expr(), get_rule_expr_funccall(), get_tablefunc(), get_variable(), and MergeAttributes().
void generate_operator_clause | ( | fmStringInfo | buf, |
const char * | leftop, | ||
Oid | leftoptype, | ||
Oid | opoid, | ||
const char * | rightop, | ||
Oid | rightoptype | ||
) |
Definition at line 11343 of file ruleutils.c.
References add_cast_to(), appendStringInfo(), appendStringInfoString(), Assert, elog, ERROR, get_namespace_name(), GETSTRUCT, HeapTupleIsValid, NameStr, ObjectIdGetDatum, OPEROID, quote_identifier(), ReleaseSysCache(), and SearchSysCache1().
Referenced by refresh_by_match_merge(), and ri_GenerateQual().
int namestrcmp | ( | Name | name, |
const char * | str | ||
) |
Definition at line 247 of file name.c.
References NAMEDATALEN, and NameStr.
Referenced by attnameAttNum(), CopyGetAttnums(), expanded_record_lookup_field(), GetAttributeByName(), and SPI_fnumber().
void namestrcpy | ( | Name | name, |
const char * | str | ||
) |
Definition at line 233 of file name.c.
References NAMEDATALEN, and NameStr.
Referenced by AddEnumLabel(), AlterObjectRename_internal(), ATExecAddColumn(), CatCacheCopyKeys(), CollationCreate(), ConstructTupleDescriptor(), ConversionCreate(), CreateConstraintEntry(), CreateInitDecodingContext(), CreateOpFamily(), CreateProceduralLanguage(), CreateStatistics(), current_database(), DefineAttr(), DefineOpClass(), DefineTSConfiguration(), DefineTSDictionary(), DefineTSParser(), DefineTSTemplate(), EnumValuesCreate(), ExecTypeSetColNames(), formrdesc(), index_concurrently_swap(), insert_event_trigger_tuple(), InsertRule(), NamespaceCreate(), OperatorCreate(), OperatorShellMake(), ProcedureCreate(), RelationBuildLocalRelation(), RemoveAttributeById(), rename_policy(), renameatt_internal(), RenameConstraintById(), RenameDatabase(), RenameEnumLabel(), RenameRelationInternal(), RenameRewriteRule(), RenameSchema(), RenameTableSpace(), renametrig(), RenameTypeInternal(), ReplicationSlotCreate(), TupleDescInitBuiltinEntry(), TupleDescInitEntry(), TypeCreate(), TypeGetTupleDesc(), and TypeShellMake().
Definition at line 1705 of file network.c.
References DirectFunctionCall1, and network_network().
Referenced by match_network_subset().
Definition at line 1719 of file network.c.
References DirectFunctionCall1, DirectFunctionCall2, inet_set_masklen(), Int32GetDatum, and network_broadcast().
Referenced by match_network_subset().
Datum numeric_float8_no_overflow | ( | PG_FUNCTION_ARGS | ) |
Definition at line 4339 of file numeric.c.
References get_float8_nan(), init_var_from_num(), NUMERIC_IS_NINF, NUMERIC_IS_PINF, NUMERIC_IS_SPECIAL, numericvar_to_double_no_overflow(), PG_GETARG_NUMERIC, PG_RETURN_FLOAT8, and val.
Referenced by convert_numeric_to_scalar(), and gbt_numeric_penalty().
int oid_cmp | ( | const void * | p1, |
const void * | p2 | ||
) |
Definition at line 336 of file oid.c.
Referenced by aclmembers(), AlterSubscription_refresh(), EnumValuesCreate(), and find_inheritance_children().
Definition at line 314 of file oid.c.
References elog, ERROR, intVal, InvalidOid, nodeTag, oidin_subr(), strVal, T_Float, and T_Integer.
Referenced by get_object_address(), and objectNamesToOids().
Definition at line 30 of file bool.c.
References parse_bool_with_len().
Referenced by parse_and_validate_value(), parse_basebackup_options(), parse_extension_control_file(), parse_one_reloption(), pg_decode_startup(), and ProcessStartupPacket().
Definition at line 36 of file bool.c.
References pg_strncasecmp().
Referenced by boolin(), and parse_bool().
int32 pg_atoi | ( | const char * | s, |
int | size, | ||
int | c | ||
) |
Definition at line 102 of file numutils.c.
References elog, ereport, errcode(), errmsg(), and ERROR.
Referenced by int2vectorin().
char* pg_inet_cidr_ntop | ( | int | af, |
const void * | src, | ||
int | bits, | ||
char * | dst, | ||
size_t | size | ||
) |
Definition at line 56 of file inet_cidr_ntop.c.
References EAFNOSUPPORT, inet_cidr_ntop_ipv4(), inet_cidr_ntop_ipv6(), PGSQL_AF_INET, and PGSQL_AF_INET6.
Referenced by cidr_abbrev().
int pg_inet_net_pton | ( | int | af, |
const char * | src, | ||
void * | dst, | ||
size_t | size | ||
) |
Definition at line 62 of file inet_net_pton.c.
References EAFNOSUPPORT, inet_cidr_pton_ipv4(), inet_cidr_pton_ipv6(), inet_net_pton_ipv4(), inet_net_pton_ipv6(), PGSQL_AF_INET, and PGSQL_AF_INET6.
Referenced by network_in().
int pg_itoa | ( | int16 | i, |
char * | a | ||
) |
Definition at line 338 of file numutils.c.
References pg_ltoa().
Referenced by int2out(), int2vectorout(), LogicalTapeSetCreate(), and ltsConcatWorkerTapes().
int pg_lltoa | ( | int64 | ll, |
char * | a | ||
) |
Definition at line 523 of file numutils.c.
References pg_ulltoa_n(), and value.
Referenced by int8out(), and printsimple().
int pg_ltoa | ( | int32 | l, |
char * | a | ||
) |
Definition at line 416 of file numutils.c.
References pg_ultoa_n().
Referenced by int4out(), pg_itoa(), and printsimple().
int16 pg_strtoint16 | ( | const char * | s | ) |
Definition at line 187 of file numutils.c.
References ereport, errcode(), errmsg(), ERROR, likely, PG_INT16_MIN, pg_mul_s16_overflow(), pg_sub_s16_overflow(), and unlikely.
Referenced by int2in().
int32 pg_strtoint32 | ( | const char * | s | ) |
Definition at line 263 of file numutils.c.
References ereport, errcode(), errmsg(), ERROR, likely, PG_INT32_MIN, pg_mul_s32_overflow(), pg_sub_s32_overflow(), and unlikely.
Referenced by ArrayGetIntegerTypmods(), check_foreign_key(), int4in(), libpqrcv_endstreaming(), libpqrcv_identify_system(), pq_parse_errornotice(), prsd_headline(), and text_format().
uint64 pg_strtouint64 | ( | const char * | str, |
char ** | endptr, | ||
int | base | ||
) |
Definition at line 621 of file numutils.c.
Referenced by check_recovery_target_xid(), parse_snapshot(), and xid8in().
int pg_ulltoa_n | ( | uint64 | l, |
char * | a | ||
) |
Definition at line 436 of file numutils.c.
References decimalLength64(), DIGIT_TABLE, and i.
Referenced by pg_lltoa().
int pg_ultoa_n | ( | uint32 | l, |
char * | a | ||
) |
Definition at line 351 of file numutils.c.
References decimalLength32(), DIGIT_TABLE, and i.
Referenced by pg_ltoa(), pg_ultostr(), and pg_ultostr_zeropad().
char* pg_ultostr | ( | char * | str, |
uint32 | value | ||
) |
Definition at line 603 of file numutils.c.
References pg_ultoa_n().
Referenced by AppendSeconds().
Definition at line 563 of file numutils.c.
References Assert, DIGIT_TABLE, and pg_ultoa_n().
Referenced by AppendSeconds(), EncodeDateOnly(), EncodeDateTime(), EncodeTimeOnly(), and EncodeTimezone().
const char* quote_identifier | ( | const char * | ident | ) |
Definition at line 10935 of file ruleutils.c.
References palloc(), pg_malloc(), quote_all_identifiers, ScanKeywordCategories, ScanKeywordLookup(), ScanKeywords, and UNRESERVED_KEYWORD.
Referenced by add_cast_to(), appendFunctionName(), ATPrepAlterColumnType(), copy_table(), decompile_column_index_array(), deparseAnalyzeSql(), deparseColumnRef(), deparseOperatorName(), deparseRelation(), DropSubscription(), execute_extension_script(), ExplainIndexScanDetails(), ExplainNode(), ExplainTargetRel(), flatten_set_variable_args(), format_operator_extended(), generate_operator_clause(), generate_operator_name(), get_column_alias_list(), get_delete_query_def(), get_from_clause_coldeflist(), get_from_clause_item(), get_insert_query_def(), get_opclass_name(), get_reloptions(), get_rule_expr(), get_rule_windowclause(), get_rule_windowspec(), get_select_query_def(), get_tablefunc(), get_target_list(), get_update_query_def(), get_update_query_targetlist_def(), get_utility_query_def(), get_variable(), get_windowfunc_expr(), get_with_clause(), getObjectIdentityParts(), initialize_worker_spi(), make_ruledef(), NameListToQuotedString(), old_9_6_invalidate_hash_indexes(), pg_get_constraintdef_worker(), pg_get_functiondef(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), pg_get_statisticsobj_worker(), pg_get_triggerdef_worker(), pg_identify_object(), PLy_quote_ident(), postgresExplainForeignScan(), postgresImportForeignSchema(), print_function_arguments(), processIndirection(), quote_ident(), quote_object_name(), quote_qualified_identifier(), regnamespaceout(), regoperout(), regroleout(), sepgsql_attribute_post_create(), sepgsql_database_post_create(), sepgsql_relation_post_create(), sepgsql_schema_post_create(), serialize_deflist(), set_frozenxids(), show_sortorder_options(), text_format_string_conversion(), and tuple_to_stringinfo().
char* quote_literal_cstr | ( | const char * | rawstr | ) |
Definition at line 102 of file quote.c.
References palloc(), and quote_literal_internal().
Referenced by build_tuplestore_recursively(), fetch_remote_table_info(), fetch_table_list(), get_sql_delete(), get_sql_insert(), get_sql_update(), get_tuple_of_interest(), pg_decode_commit_prepared_txn(), pg_decode_prepare_txn(), pg_decode_rollback_prepared_txn(), pg_decode_stream_prepare(), PLy_quote_literal(), PLy_quote_nullable(), and text_format_string_conversion().
char* quote_qualified_identifier | ( | const char * | qualifier, |
const char * | ident | ||
) |
Definition at line 11019 of file ruleutils.c.
References appendStringInfo(), appendStringInfoString(), buf, StringInfoData::data, initStringInfo(), and quote_identifier().
Referenced by check_TSCurrentConfig(), copy_table(), ExecRefreshMatView(), format_procedure_extended(), format_type_extended(), generate_collation_name(), generate_function_name(), generate_qualified_relation_name(), generate_qualified_type_name(), generate_relation_name(), getObjectDescription(), getObjectIdentityParts(), getOpFamilyDescription(), getOpFamilyIdentity(), getRelationDescription(), getRelationIdentity(), pg_decode_change(), pg_decode_truncate(), pg_get_functiondef(), pg_get_statisticsobj_worker(), refresh_by_match_merge(), regclassout(), regcollationout(), regconfigout(), regdictionaryout(), regprocout(), sepgsql_proc_post_create(), and transformColumnDefinition().
Definition at line 1499 of file regexp.c.
References Assert, pg_re_flags::cflags, CHECK_FOR_INTERRUPTS, ereport, errcode(), errmsg(), ERROR, free, palloc(), pg_database_encoding_max_length(), pg_regerror(), pg_regprefix(), pg_wchar2mb_with_len(), RE_compile_and_cache(), REG_ADVANCED, REG_EXACT, REG_ICASE, REG_NOMATCH, REG_PREFIX, and generate_unaccent_rules::str.
Referenced by regex_fixed_prefix().
char* text_to_cstring | ( | const text * | t | ) |
Definition at line 222 of file varlena.c.
References palloc(), pfree(), pg_detoast_datum_packed(), unconstify, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by array_to_text(), array_to_text_null(), binary_upgrade_create_empty_extension(), binary_upgrade_set_missing_value(), connectby_text(), connectby_text_serial(), convert_and_check_filename(), convert_any_priv_string(), convert_column_name(), convert_database_name(), convert_foreign_data_wrapper_name(), convert_function_name(), convert_language_name(), convert_priv_string(), convert_schema_name(), convert_server_name(), convert_tablespace_name(), convert_type_name(), crosstab(), crosstab_hash(), cursor_to_xml(), cursor_to_xmlschema(), database_to_xml(), database_to_xml_and_xmlschema(), database_to_xmlschema(), datetime_to_char_body(), datum_to_json(), dblink_cancel_query(), dblink_close(), dblink_connect(), dblink_disconnect(), dblink_error_message(), dblink_exec(), dblink_fetch(), dblink_get_notify(), dblink_is_busy(), dblink_open(), dblink_record_internal(), dblink_send_query(), deserialize_deflist(), difference(), dmetaphone(), dmetaphone_alt(), do_to_timestamp(), ExecAlterExtensionStmt(), execute_extension_script(), executeDateTimeMethod(), get_raw_page_fork(), get_raw_page_fork_1_9(), has_sequence_privilege_id_name(), has_sequence_privilege_name(), has_sequence_privilege_name_name(), json_object_field(), json_object_field_text(), jsonb_set_lax(), ltree_addtext(), ltree_textadd(), NUM_cache(), parse_datetime(), parse_ident(), pg_create_restore_point(), pg_crypt(), pg_current_logfile(), pg_get_expr_worker(), pg_get_publication_tables(), pg_get_serial_sequence(), pg_index_column_has_property(), pg_index_has_property(), pg_indexam_has_property(), pg_logical_emit_message_bytea(), pg_notify(), pg_prewarm(), pg_relation_size(), pg_replication_origin_advance(), pg_replication_origin_create(), pg_replication_origin_drop(), pg_replication_origin_oid(), pg_replication_origin_progress(), pg_replication_origin_session_setup(), pg_size_bytes(), pg_start_backup(), pg_stat_get_progress_info(), pg_stat_reset_replication_slot(), pg_stat_reset_shared(), pg_stat_reset_slru(), pgxml_texttoxmlchar(), phraseto_tsquery_byid(), plainto_tsquery_byid(), query_to_xml(), query_to_xml_and_xmlschema(), query_to_xmlschema(), quote_ident(), quote_ident_cstr(), range_constructor3(), regress_setenv(), replorigin_by_oid(), schema_to_xml(), schema_to_xml_and_xmlschema(), schema_to_xmlschema(), sepgsql_mcstrans_in(), sepgsql_mcstrans_out(), soundex(), table_to_xml(), table_to_xml_and_xmlschema(), table_to_xmlschema(), test_predtest(), text2ltree(), text_concat_ws(), textToQualifiedNameList(), to_date(), to_regclass(), to_regcollation(), to_regnamespace(), to_regoper(), to_regoperator(), to_regproc(), to_regprocedure(), to_regrole(), to_regtype(), to_timestamp(), to_tsquery_byid(), transform_string_values_scalar(), ts_stat_sql(), tsquery_rewrite_query(), tuple_data_split(), unicode_is_normalized(), unicode_normalize_func(), verify_heapam(), websearch_to_tsquery_byid(), X509_NAME_field_to_text(), xml_is_document(), xml_out_internal(), xmlconcat(), xmlpi(), xmlroot(), xpath_table(), and xslt_process().
void text_to_cstring_buffer | ( | const text * | src, |
char * | dst, | ||
size_t | dst_len | ||
) |
Definition at line 253 of file varlena.c.
References pfree(), pg_detoast_datum_packed(), pg_mbcliplen(), unconstify, VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by be_lo_export(), lo_import_internal(), parse_sane_timezone(), pg_gen_salt(), pg_gen_salt_rounds(), timestamp_zone(), timestamptz_trunc_zone(), timestamptz_zone(), and timetz_zone().
Definition at line 408 of file format_type.c.
References BITS_PER_BYTE, GetDatabaseEncoding(), numeric_maximum_size(), pg_encoding_max_length(), and VARHDRSZ.
Referenced by get_typavgwidth(), and heapam_relation_needs_toast_table().
int xidComparator | ( | const void * | arg1, |
const void * | arg2 | ||
) |
Definition at line 136 of file xid.c.
Referenced by ProcArrayApplyRecoveryInfo(), ReorderBufferCopySnap(), SerializeTransactionState(), SnapBuildBuildSnapshot(), SnapBuildInitialSnapshot(), and TransactionIdInArray().
bool quote_all_identifiers |
Definition at line 314 of file ruleutils.c.
Referenced by fmtId(), main(), quote_identifier(), and setup_connection().