PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_type.h File Reference
#include "catalog/genbki.h"
Include dependency graph for pg_type.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TypeRelationId   1247
 
#define TypeRelation_Rowtype_Id   71
 
#define Natts_pg_type   30
 
#define Anum_pg_type_typname   1
 
#define Anum_pg_type_typnamespace   2
 
#define Anum_pg_type_typowner   3
 
#define Anum_pg_type_typlen   4
 
#define Anum_pg_type_typbyval   5
 
#define Anum_pg_type_typtype   6
 
#define Anum_pg_type_typcategory   7
 
#define Anum_pg_type_typispreferred   8
 
#define Anum_pg_type_typisdefined   9
 
#define Anum_pg_type_typdelim   10
 
#define Anum_pg_type_typrelid   11
 
#define Anum_pg_type_typelem   12
 
#define Anum_pg_type_typarray   13
 
#define Anum_pg_type_typinput   14
 
#define Anum_pg_type_typoutput   15
 
#define Anum_pg_type_typreceive   16
 
#define Anum_pg_type_typsend   17
 
#define Anum_pg_type_typmodin   18
 
#define Anum_pg_type_typmodout   19
 
#define Anum_pg_type_typanalyze   20
 
#define Anum_pg_type_typalign   21
 
#define Anum_pg_type_typstorage   22
 
#define Anum_pg_type_typnotnull   23
 
#define Anum_pg_type_typbasetype   24
 
#define Anum_pg_type_typtypmod   25
 
#define Anum_pg_type_typndims   26
 
#define Anum_pg_type_typcollation   27
 
#define Anum_pg_type_typdefaultbin   28
 
#define Anum_pg_type_typdefault   29
 
#define Anum_pg_type_typacl   30
 
#define BOOLOID   16
 
#define BYTEAOID   17
 
#define CHAROID   18
 
#define NAMEOID   19
 
#define INT8OID   20
 
#define INT2OID   21
 
#define INT2VECTOROID   22
 
#define INT4OID   23
 
#define REGPROCOID   24
 
#define TEXTOID   25
 
#define OIDOID   26
 
#define TIDOID   27
 
#define XIDOID   28
 
#define CIDOID   29
 
#define OIDVECTOROID   30
 
#define JSONOID   114
 
#define XMLOID   142
 
#define PGNODETREEOID   194
 
#define PGNDISTINCTOID   3361
 
#define PGDEPENDENCIESOID   3402
 
#define PGDDLCOMMANDOID   32
 
#define POINTOID   600
 
#define LSEGOID   601
 
#define PATHOID   602
 
#define BOXOID   603
 
#define POLYGONOID   604
 
#define LINEOID   628
 
#define FLOAT4OID   700
 
#define FLOAT8OID   701
 
#define ABSTIMEOID   702
 
#define RELTIMEOID   703
 
#define TINTERVALOID   704
 
#define UNKNOWNOID   705
 
#define CIRCLEOID   718
 
#define CASHOID   790
 
#define MACADDROID   829
 
#define INETOID   869
 
#define CIDROID   650
 
#define MACADDR8OID   774
 
#define INT2ARRAYOID   1005
 
#define INT4ARRAYOID   1007
 
#define TEXTARRAYOID   1009
 
#define OIDARRAYOID   1028
 
#define FLOAT4ARRAYOID   1021
 
#define ACLITEMOID   1033
 
#define CSTRINGARRAYOID   1263
 
#define BPCHAROID   1042
 
#define VARCHAROID   1043
 
#define DATEOID   1082
 
#define TIMEOID   1083
 
#define TIMESTAMPOID   1114
 
#define TIMESTAMPTZOID   1184
 
#define INTERVALOID   1186
 
#define TIMETZOID   1266
 
#define BITOID   1560
 
#define VARBITOID   1562
 
#define NUMERICOID   1700
 
#define REFCURSOROID   1790
 
#define REGPROCEDUREOID   2202
 
#define REGOPEROID   2203
 
#define REGOPERATOROID   2204
 
#define REGCLASSOID   2205
 
#define REGTYPEOID   2206
 
#define REGROLEOID   4096
 
#define REGNAMESPACEOID   4089
 
#define REGTYPEARRAYOID   2211
 
#define UUIDOID   2950
 
#define LSNOID   3220
 
#define TSVECTOROID   3614
 
#define GTSVECTOROID   3642
 
#define TSQUERYOID   3615
 
#define REGCONFIGOID   3734
 
#define REGDICTIONARYOID   3769
 
#define JSONBOID   3802
 
#define INT4RANGEOID   3904
 
#define RECORDOID   2249
 
#define RECORDARRAYOID   2287
 
#define CSTRINGOID   2275
 
#define ANYOID   2276
 
#define ANYARRAYOID   2277
 
#define VOIDOID   2278
 
#define TRIGGEROID   2279
 
#define EVTTRIGGEROID   3838
 
#define LANGUAGE_HANDLEROID   2280
 
#define INTERNALOID   2281
 
#define OPAQUEOID   2282
 
#define ANYELEMENTOID   2283
 
#define ANYNONARRAYOID   2776
 
#define ANYENUMOID   3500
 
#define FDW_HANDLEROID   3115
 
#define INDEX_AM_HANDLEROID   325
 
#define TSM_HANDLEROID   3310
 
#define ANYRANGEOID   3831
 
#define TYPTYPE_BASE   'b' /* base type (ordinary scalar type) */
 
#define TYPTYPE_COMPOSITE   'c' /* composite (e.g., table's rowtype) */
 
#define TYPTYPE_DOMAIN   'd' /* domain over another type */
 
#define TYPTYPE_ENUM   'e' /* enumerated type */
 
#define TYPTYPE_PSEUDO   'p' /* pseudo-type */
 
#define TYPTYPE_RANGE   'r' /* range type */
 
#define TYPCATEGORY_INVALID   '\0' /* not an allowed category */
 
#define TYPCATEGORY_ARRAY   'A'
 
#define TYPCATEGORY_BOOLEAN   'B'
 
#define TYPCATEGORY_COMPOSITE   'C'
 
#define TYPCATEGORY_DATETIME   'D'
 
#define TYPCATEGORY_ENUM   'E'
 
#define TYPCATEGORY_GEOMETRIC   'G'
 
#define TYPCATEGORY_NETWORK   'I' /* think INET */
 
#define TYPCATEGORY_NUMERIC   'N'
 
#define TYPCATEGORY_PSEUDOTYPE   'P'
 
#define TYPCATEGORY_RANGE   'R'
 
#define TYPCATEGORY_STRING   'S'
 
#define TYPCATEGORY_TIMESPAN   'T'
 
#define TYPCATEGORY_USER   'U'
 
#define TYPCATEGORY_BITSTRING   'V' /* er ... "varbit"? */
 
#define TYPCATEGORY_UNKNOWN   'X'
 
#define IsPolymorphicType(typid)
 

Typedefs

typedef FormData_pg_typeForm_pg_type
 

Functions

 CATALOG (pg_type, 1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
 
 DATA (insert OID=16(boolPGNSP PGUID 1 t b B t t\054 00 1000 boolin boolout boolrecv boolsend---c p f 0-1 0 0 _null_ _null_ _null_))
 
 DESCR ("boolean, 'true'/'false'")
 
 DESCR ("variable-length string, binary values escaped")
 
 DESCR ("single character")
 
 DESCR ("63-byte type for storing system identifiers")
 
 DESCR ("~18 digit integer, 8-byte storage")
 
 DESCR ("-32 thousand to 32 thousand, 2-byte storage")
 
 DESCR ("array of int2, used in system tables")
 
 DESCR ("-2 billion to 2 billion integer, 4-byte storage")
 
 DESCR ("registered procedure")
 
 DESCR ("variable-length string, no limit specified")
 
 DESCR ("object identifier(oid), maximum 4 billion")
 
 DESCR ("(block, offset), physical location of tuple")
 
 DESCR ("transaction id")
 
 DESCR ("command identifier type, sequence in transaction id")
 
 DESCR ("XML content")
 
 DESCR ("string representing an internal node tree")
 
 DESCR ("multivariate ndistinct coefficients")
 
 DESCR ("multivariate dependencies")
 
 DESCR ("internal type for passing CollectedCommand")
 
 DESCR ("storage manager")
 
 DESCR ("geometric point '(x, y)'")
 
 DESCR ("geometric line segment '(pt1,pt2)'")
 
 DESCR ("geometric path '(pt1,...)'")
 
 DESCR ("geometric box '(lower left,upper right)'")
 
 DESCR ("geometric polygon '(pt1,...)'")
 
 DESCR ("geometric line")
 
 DESCR ("single-precision floating point number, 4-byte storage")
 
 DESCR ("double-precision floating point number, 8-byte storage")
 
 DESCR ("absolute, limited-range date and time (Unix system time)")
 
 DESCR ("relative, limited-range time interval (Unix delta time)")
 
 DESCR ("(abstime,abstime), time interval")
 
 DESCR ("")
 
 DESCR ("geometric circle '(center,radius)'")
 
 DESCR ("monetary amounts, $d,ddd.cc")
 
 DESCR ("XX:XX:XX:XX:XX:XX, MAC address")
 
 DESCR ("IP address/netmask, host address, netmask optional")
 
 DESCR ("network IP address/netmask, network address")
 
 DESCR ("XX:XX:XX:XX:XX:XX:XX:XX, MAC address")
 
 DESCR ("access control list")
 
 DESCR ("char(length), blank-padded string, fixed storage length")
 
 DESCR ("varchar(length), non-blank-padded string, variable storage length")
 
 DESCR ("date")
 
 DESCR ("time of day")
 
 DESCR ("date and time")
 
 DESCR ("date and time with time zone")
 
 DESCR ("@ <number> <units>, time interval")
 
 DESCR ("time of day with time zone")
 
 DESCR ("fixed-length bit string")
 
 DESCR ("variable-length bit string")
 
 DESCR ("numeric(precision, decimal), arbitrary precision number")
 
 DESCR ("reference to cursor (portal name)")
 
 DESCR ("registered procedure (with args)")
 
 DESCR ("registered operator")
 
 DESCR ("registered operator (with args)")
 
 DESCR ("registered class")
 
 DESCR ("registered type")
 
 DESCR ("registered role")
 
 DESCR ("registered namespace")
 
 DESCR ("UUID datatype")
 
 DESCR ("PostgreSQL LSN datatype")
 
 DESCR ("text representation for text search")
 
 DESCR ("GiST index internal text representation for text search")
 
 DESCR ("query representation for text search")
 
 DESCR ("registered text search configuration")
 
 DESCR ("registered text search dictionary")
 
 DESCR ("Binary JSON")
 
 DESCR ("txid snapshot")
 
 DESCR ("range of integers")
 
 DESCR ("range of numerics")
 
 DESCR ("range of timestamps without time zone")
 
 DESCR ("range of timestamps with time zone")
 
 DESCR ("range of dates")
 
 DESCR ("range of bigints")
 

Variables

 FormData_pg_type
 

Macro Definition Documentation

#define ABSTIMEOID   702
#define ACLITEMOID   1033

Definition at line 493 of file pg_type.h.

Referenced by allocacl(), and check_acl().

#define Anum_pg_type_typacl   30
#define Anum_pg_type_typalign   21

Definition at line 260 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typanalyze   20

Definition at line 259 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typarray   13

Definition at line 252 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typbasetype   24

Definition at line 263 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typbyval   5

Definition at line 244 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typcategory   7

Definition at line 246 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typcollation   27

Definition at line 266 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typdefault   29
#define Anum_pg_type_typdefaultbin   28
#define Anum_pg_type_typdelim   10

Definition at line 249 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typelem   12

Definition at line 251 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typinput   14

Definition at line 253 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typisdefined   9

Definition at line 248 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typispreferred   8

Definition at line 247 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typlen   4

Definition at line 243 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typmodin   18

Definition at line 257 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typmodout   19

Definition at line 258 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typname   1

Definition at line 240 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typnamespace   2

Definition at line 241 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typndims   26

Definition at line 265 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typnotnull   23

Definition at line 262 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typoutput   15

Definition at line 254 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typowner   3

Definition at line 242 of file pg_type.h.

Referenced by AlterTypeOwnerInternal(), TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typreceive   16

Definition at line 255 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typrelid   11

Definition at line 250 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typsend   17

Definition at line 256 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typstorage   22

Definition at line 261 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typtype   6

Definition at line 245 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typtypmod   25

Definition at line 264 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define BITOID   1560
#define BOOLOID   16

Definition at line 288 of file pg_type.h.

Referenced by aclexplode(), add_security_quals(), add_with_check_options(), adjust_rowcompare_for_index(), AlterOperator(), arrayconst_startup_fn(), arrayexpr_startup_fn(), assignOperTypes(), blvalidate(), brin_inclusion_opcinfo(), brinvalidate(), btvalidate(), build_coercion_expression(), build_implied_join_equality(), build_subplan(), check_hash_func_signature(), coerce_to_boolean(), convert_EXISTS_to_ANY(), convert_numeric_to_scalar(), convert_to_scalar(), CreateCast(), dblink_close(), dblink_exec(), dblink_fetch(), dblink_open(), dblink_record_internal(), DefineSequence(), deparseConst(), do_compile(), dumpTableData_insert(), ecpg_dynamic_type(), ecpg_is_type_an_array(), estimate_num_groups(), exec_eval_boolean(), expand_boolean_index_clause(), exprType(), fetch_remote_table_info(), findTypeAnalyzeFunction(), format_type_internal(), get_const_expr(), get_variable_numdistinct(), GetCCHashEqFuncs(), ginvalidate(), gistvalidate(), hashvalidate(), json_categorize_type(), jsonb_categorize_type(), make_distinct_op(), make_partition_op_expr(), make_row_comparison_op(), make_scalar_array_op(), makeBoolConst(), map_sql_type_to_xml_name(), map_sql_type_to_xmlschema_type(), map_sql_value_to_xml_value(), network_prefix_quals(), operator_predicate_proof(), OperatorCreate(), pg_buffercache_pages(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_cursor(), pg_lock_status(), pg_prepared_statement(), pg_sequence_parameters(), pg_stat_file(), pg_timezone_abbrevs(), pg_timezone_names(), pg_visibility_tupdesc(), plpgsql_compile_inline(), PLy_input_datum_func2(), PLy_output_datum_func2(), prefix_quals(), print_literal(), process_implied_equality(), show_all_file_settings(), show_all_settings(), spgvalidate(), transformAExprNullIf(), and TupleDescInitBuiltinEntry().

#define BOXOID   603

Definition at line 402 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), and spg_box_quad_config().

#define CASHOID   790

Definition at line 439 of file pg_type.h.

Referenced by column_type_alignment(), and ecpg_is_type_an_array().

#define CIDOID   29
#define CIDROID   650
#define CIRCLEOID   718

Definition at line 435 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define CSTRINGARRAYOID   1263

Definition at line 500 of file pg_type.h.

Referenced by findTypeTypmodinFunction().

#define EVTTRIGGEROID   3838
#define FDW_HANDLEROID   3115

Definition at line 708 of file pg_type.h.

Referenced by lookup_fdw_handler_func().

#define FLOAT4ARRAYOID   1021

Definition at line 485 of file pg_type.h.

#define GTSVECTOROID   3642

Definition at line 618 of file pg_type.h.

#define INDEX_AM_HANDLEROID   325

Definition at line 710 of file pg_type.h.

Referenced by lookup_index_am_handler_func().

#define INT2ARRAYOID   1005

Definition at line 464 of file pg_type.h.

Referenced by transformArrayType(), and tsvector_unnest().

#define INT2VECTOROID   22

Definition at line 312 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), find_coercion_pathway(), and transformArrayType().

#define INT4ARRAYOID   1007

Definition at line 467 of file pg_type.h.

Referenced by _int_matchsel(), do_compile(), and plpgsql_resolve_polymorphic_argtypes().

#define INT4OID   23

Definition at line 316 of file pg_type.h.

Referenced by _int_matchsel(), array_positions(), assignProcTypes(), autoinc(), blvalidate(), btvalidate(), build_coercion_expression(), check_hash_func_signature(), check_sql_fn_retval(), coerce_record_to_complex(), column_type_alignment(), convert_numeric_to_scalar(), convert_to_scalar(), create_toast_table(), CreateCast(), CreateConversionCommand(), dblink_get_notify(), dblink_get_pkey(), deparseConst(), do_compile(), dumpTableData_insert(), ecpg_dynamic_type(), ecpg_is_type_an_array(), eval_const_expressions_mutator(), exec_eval_integer(), ExecEvalNextValueExpr(), ExecInitExprRec(), expand_targetlist(), expandRTE(), expandTupleDesc(), exprIsLengthCoercion(), exprType(), fetch_remote_table_info(), findTypeInputFunction(), findTypeReceiveFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), format_type_internal(), generate_append_tlist(), generate_setop_tlist(), get_const_expr(), get_ts_parser_func(), GetCCHashEqFuncs(), ginvalidate(), hashhandler(), hypothetical_check_argtypes(), IdentifySystem(), init_params(), json_categorize_type(), jsonb_categorize_type(), make_const(), map_sql_type_to_xml_name(), map_sql_type_to_xmlschema_type(), new_intArrayType(), ordered_set_startup(), pg_blocking_pids(), pg_buffercache_pages(), pg_control_checkpoint(), pg_control_init(), pg_control_recovery(), pg_control_system(), pg_get_object_address(), pg_isolation_test_session_is_blocked(), pg_lock_status(), pg_safe_snapshot_blocking_pids(), pg_walfile_name_offset(), plpgsql_resolve_polymorphic_argtypes(), PLy_input_datum_func2(), print_literal(), printsimple(), prs_setup_firstcall(), show_all_file_settings(), show_all_settings(), sqlda_dynamic_type(), text_format(), transformArraySubscripts(), transformColumnDefinition(), transformOnConflictClause(), transformRangeTableFunc(), transformXmlExpr(), ts_setup_firstcall(), tt_setup_firstcall(), ttdummy(), TupleDescInitBuiltinEntry(), validateConnectbyTupleDesc(), and ValidateRestrictionEstimator().

#define INT4RANGEOID   3904

Definition at line 648 of file pg_type.h.

Referenced by do_compile(), and plpgsql_resolve_polymorphic_argtypes().

#define IsPolymorphicType (   typid)
#define LANGUAGE_HANDLEROID   2280

Definition at line 696 of file pg_type.h.

Referenced by CreateProceduralLanguage().

#define LINEOID   628

Definition at line 409 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define LSEGOID   601

Definition at line 396 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define LSNOID   3220

Definition at line 609 of file pg_type.h.

Referenced by pg_control_checkpoint(), and pg_control_recovery().

#define MACADDR8OID   774

Definition at line 454 of file pg_type.h.

Referenced by convert_network_to_scalar(), and convert_to_scalar().

#define MACADDROID   829

Definition at line 445 of file pg_type.h.

Referenced by convert_network_to_scalar(), and convert_to_scalar().

#define Natts_pg_type   30
#define OIDARRAYOID   1028

Definition at line 472 of file pg_type.h.

Referenced by transformArrayType().

#define OIDVECTOROID   30
#define PATHOID   602

Definition at line 399 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define PGDDLCOMMANDOID   32

Definition at line 377 of file pg_type.h.

#define PGDEPENDENCIESOID   3402

Definition at line 373 of file pg_type.h.

#define PGNDISTINCTOID   3361

Definition at line 369 of file pg_type.h.

#define PGNODETREEOID   194

Definition at line 365 of file pg_type.h.

#define POINTOID   600

Definition at line 393 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), and spg_quad_config().

#define POLYGONOID   604

Definition at line 405 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define RECORDARRAYOID   2287
#define RECORDOID   2249

Definition at line 680 of file pg_type.h.

Referenced by assign_record_type_typmod(), BlessTupleDesc(), build_datatype(), build_function_result_tupdesc_t(), build_row_from_vars(), build_subplan(), BuildHardcodedDescriptor(), cache_record_field_properties(), can_coerce_type(), check_sql_fn_retval(), coerce_record_to_complex(), coerce_type(), compile_plperl_function(), compile_pltcl_function(), count_rowexpr_columns(), CreateTemplateTupleDesc(), do_compile(), evaluate_function(), ExecEvalConvertRowtype(), ExecEvalWholeRowVar(), ExecInitExprRec(), ExecInitFunctionScan(), ExecTypeSetColNames(), expandRecordVariable(), ExpandRowReference(), exprType(), fmgr_sql_validator(), func_get_detail(), get_cast_hashentry(), get_name_for_var_field(), get_rule_expr(), get_type_func_class(), inline_function(), inline_set_returning_function(), internal_get_result_type(), interpret_function_parameter_list(), IsBinaryCoercible(), lookup_rowtype_tupdesc_internal(), makeWholeRowVar(), map_variable_attnos_mutator(), ParseComplexProjection(), ParseFuncOrColumn(), plperl_validator(), plpgsql_validator(), PLy_exec_function(), PLy_function_build_args(), PLy_input_tuple_funcs(), PLy_output_tuple_funcs(), PLy_procedure_create(), prepare_column_cache(), ProcedureCreate(), pullup_replace_vars_callback(), record_in(), record_recv(), ReplaceVarsFromTargetList_callback(), rowtype_field_matches(), SPI_returntuple(), transformAExprIn(), transformRowExpr(), type_is_rowtype(), TypeGetTupleDesc(), and unknown_attribute().

#define REFCURSOROID   1790

Definition at line 558 of file pg_type.h.

Referenced by fetch_cursor_param_value(), and transformCurrentOfExpr().

#define REGCLASSOID   2205
#define REGCONFIGOID   3734
#define REGDICTIONARYOID   3769
#define REGNAMESPACEOID   4089
#define REGOPERATOROID   2204
#define REGOPEROID   2203
#define REGPROCEDUREOID   2202
#define REGPROCOID   24
#define REGROLEOID   4096
#define REGTYPEARRAYOID   2211

Definition at line 596 of file pg_type.h.

Referenced by pg_prepared_statement().

#define REGTYPEOID   2206
#define RELTIMEOID   703
#define TEXTOID   25

Definition at line 324 of file pg_type.h.

Referenced by aclexplode(), addTargetToGroupList(), addTargetToSortList(), analyzeCTETargetList(), array_to_tsvector(), binary_upgrade_create_empty_extension(), build_function_result_tupdesc_d(), build_regexp_match_result(), compute_tsvector_stats(), convert_string_datum(), convert_to_scalar(), CreateReplicationSlot(), dblink_get_connections(), dblink_get_notify(), dblink_get_pkey(), DecodeTextArrayToCString(), do_compile(), ecpg_dynamic_type(), ecpg_is_type_an_array(), exec_assign_c_string(), exec_eval_using_params(), ExplainResultDesc(), exprType(), extension_config_remove(), fetch_remote_table_info(), fetch_table_list(), filter_list_to_array(), flatten_reloptions(), get_altertable_subcmdtypes(), get_func_arg_info(), get_func_input_arg_names(), get_func_result_name(), get_jsonb_path_all(), get_path_all(), get_text_array_contents(), GetCCHashEqFuncs(), gethba_options(), GetPGVariableResultDesc(), ghstore_consistent(), gin_extract_hstore_query(), gin_extract_jsonb_query(), gin_page_opaque_info(), GUCArrayAdd(), GUCArrayDelete(), GUCArrayReset(), hstore_akeys(), hstore_avals(), hstore_from_array(), hstore_from_arrays(), hstore_slice_to_array(), hstore_to_array_internal(), hstoreArrayToPairs(), IdentifySystem(), insert_username(), interpret_function_parameter_list(), json_object(), json_object_two_arg(), jsonb_build_array(), jsonb_build_object(), jsonb_delete_array(), jsonb_delete_path(), jsonb_exists_all(), jsonb_exists_any(), jsonb_insert(), jsonb_object(), jsonb_object_two_arg(), jsonb_set(), like_fixed_prefix(), makeRangeConstructors(), map_sql_type_to_xmlschema_type(), materializeQueryResult(), materializeResult(), optionListToArray(), page_header(), parse_ident(), parse_key_value_arrays(), parseRelOptions(), patternsel(), pg_config(), pg_control_checkpoint(), pg_cursor(), pg_event_trigger_dropped_objects(), pg_extension_config_dump(), pg_get_functiondef(), pg_get_keywords(), pg_get_multixact_members(), pg_get_object_address(), pg_identify_object(), pg_identify_object_as_address(), pg_lock_status(), pg_logdir_ls(), pg_logical_slot_get_changes_guts(), pg_ls_dir_files(), pg_prepared_statement(), pg_prepared_xact(), pg_stat_get_archiver(), pg_timezone_abbrevs(), pg_timezone_names(), pg_walfile_name_offset(), plpgsql_exec_trigger(), prefix_quals(), printsimple(), ProcessGUCArray(), prs_setup_firstcall(), publicationListToArray(), receiveFileChunks(), regexp_split_to_array(), resolveTargetListUnknowns(), select_common_type(), SendBackupHeader(), SendTimeLineHistory(), SendXlogRecPtrResult(), show_all_file_settings(), show_all_settings(), show_trgm(), ShowAllGUCConfig(), ShowGUCConfigOption(), spg_text_config(), sqlda_dynamic_type(), StartReplication(), string_to_const(), strlist_to_textarray(), text_to_array_internal(), textarray_to_stringlist(), textarray_to_strvaluelist(), timetravel(), transformCaseExpr(), transformGenericOptions(), transformRangeTableFunc(), transformRelOptions(), transformXmlExpr(), transformXmlSerialize(), ts_lexize(), ts_setup_firstcall(), tsvector_delete_arr(), tsvector_setweight_by_filter(), tsvector_to_array(), tsvector_unnest(), tsvector_update_trigger(), tt_setup_firstcall(), TupleDescInitBuiltinEntry(), untransformRelOptions(), and validateConnectbyTupleDesc().

#define TINTERVALOID   704
#define TSM_HANDLEROID   3310

Definition at line 712 of file pg_type.h.

Referenced by transformRangeTableSample().

#define TSQUERYOID   3615

Definition at line 621 of file pg_type.h.

Referenced by get_ts_parser_func(), tsmatchsel(), and tsquery_rewrite_query().

#define TSVECTOROID   3614

Definition at line 615 of file pg_type.h.

Referenced by ts_stat_sql(), tsmatchsel(), and tsvector_update_trigger().

#define TYPCATEGORY_ARRAY   'A'
#define TYPCATEGORY_BITSTRING   'V' /* er ... "varbit"? */

Definition at line 741 of file pg_type.h.

#define TYPCATEGORY_BOOLEAN   'B'

Definition at line 729 of file pg_type.h.

#define TYPCATEGORY_COMPOSITE   'C'

Definition at line 730 of file pg_type.h.

Referenced by AddNewRelationType().

#define TYPCATEGORY_DATETIME   'D'

Definition at line 731 of file pg_type.h.

#define TYPCATEGORY_ENUM   'E'

Definition at line 732 of file pg_type.h.

Referenced by DefineEnum().

#define TYPCATEGORY_GEOMETRIC   'G'

Definition at line 733 of file pg_type.h.

#define TYPCATEGORY_INVALID   '\0' /* not an allowed category */

Definition at line 727 of file pg_type.h.

Referenced by func_select_candidate(), IsPreferredType(), and TypeCategory().

#define TYPCATEGORY_NETWORK   'I' /* think INET */

Definition at line 734 of file pg_type.h.

#define TYPCATEGORY_NUMERIC   'N'

Definition at line 735 of file pg_type.h.

#define TYPCATEGORY_PSEUDOTYPE   'P'

Definition at line 736 of file pg_type.h.

Referenced by TypeShellMake().

#define TYPCATEGORY_RANGE   'R'

Definition at line 737 of file pg_type.h.

Referenced by DefineRange().

#define TYPCATEGORY_STRING   'S'

Definition at line 738 of file pg_type.h.

Referenced by find_coercion_pathway(), func_get_detail(), and func_select_candidate().

#define TYPCATEGORY_TIMESPAN   'T'

Definition at line 739 of file pg_type.h.

#define TYPCATEGORY_UNKNOWN   'X'

Definition at line 742 of file pg_type.h.

#define TYPCATEGORY_USER   'U'

Definition at line 740 of file pg_type.h.

Referenced by DefineType().

#define TypeRelation_Rowtype_Id   71

Definition at line 35 of file pg_type.h.

Referenced by RelationCacheInitializePhase3().

#define TYPTYPE_BASE   'b' /* base type (ordinary scalar type) */
#define UUIDOID   2950

Definition at line 603 of file pg_type.h.

Typedef Documentation

Definition at line 233 of file pg_type.h.

Function Documentation

CATALOG ( pg_type  ,
1247   
)

Definition at line 37 of file pg_type.h.

38 {
39  NameData typname; /* type name */
40  Oid typnamespace; /* OID of namespace containing this type */
41  Oid typowner; /* type owner */
42 
43  /*
44  * For a fixed-size type, typlen is the number of bytes we use to
45  * represent a value of this type, e.g. 4 for an int4. But for a
46  * variable-length type, typlen is negative. We use -1 to indicate a
47  * "varlena" type (one that has a length word), -2 to indicate a
48  * null-terminated C string.
49  */
50  int16 typlen;
51 
52  /*
53  * typbyval determines whether internal Postgres routines pass a value of
54  * this type by value or by reference. typbyval had better be FALSE if
55  * the length is not 1, 2, or 4 (or 8 on 8-byte-Datum machines).
56  * Variable-length types are always passed by reference. Note that
57  * typbyval can be false even if the length would allow pass-by-value;
58  * this is currently true for type float4, for example.
59  */
60  bool typbyval;
61 
62  /*
63  * typtype is 'b' for a base type, 'c' for a composite type (e.g., a
64  * table's rowtype), 'd' for a domain, 'e' for an enum type, 'p' for a
65  * pseudo-type, or 'r' for a range type. (Use the TYPTYPE macros below.)
66  *
67  * If typtype is 'c', typrelid is the OID of the class' entry in pg_class.
68  */
69  char typtype;
70 
71  /*
72  * typcategory and typispreferred help the parser distinguish preferred
73  * and non-preferred coercions. The category can be any single ASCII
74  * character (but not \0). The categories used for built-in types are
75  * identified by the TYPCATEGORY macros below.
76  */
77  char typcategory; /* arbitrary type classification */
78 
79  bool typispreferred; /* is type "preferred" within its category? */
80 
81  /*
82  * If typisdefined is false, the entry is only a placeholder (forward
83  * reference). We know the type name, but not yet anything else about it.
84  */
85  bool typisdefined;
86 
87  char typdelim; /* delimiter for arrays of this type */
88 
89  Oid typrelid; /* 0 if not a composite type */
90 
91  /*
92  * If typelem is not 0 then it identifies another row in pg_type. The
93  * current type can then be subscripted like an array yielding values of
94  * type typelem. A non-zero typelem does not guarantee this type to be a
95  * "real" array type; some ordinary fixed-length types can also be
96  * subscripted (e.g., name, point). Variable-length types can *not* be
97  * turned into pseudo-arrays like that. Hence, the way to determine
98  * whether a type is a "true" array type is if:
99  *
100  * typelem != 0 and typlen == -1.
101  */
102  Oid typelem;
103 
104  /*
105  * If there is a "true" array type having this type as element type,
106  * typarray links to it. Zero if no associated "true" array type.
107  */
108  Oid typarray;
109 
110  /*
111  * I/O conversion procedures for the datatype.
112  */
113  regproc typinput; /* text format (required) */
114  regproc typoutput;
115  regproc typreceive; /* binary format (optional) */
116  regproc typsend;
117 
118  /*
119  * I/O functions for optional type modifiers.
120  */
121  regproc typmodin;
122  regproc typmodout;
123 
124  /*
125  * Custom ANALYZE procedure for the datatype (0 selects the default).
126  */
127  regproc typanalyze;
128 
129  /* ----------------
130  * typalign is the alignment required when storing a value of this
131  * type. It applies to storage on disk as well as most
132  * representations of the value inside Postgres. When multiple values
133  * are stored consecutively, such as in the representation of a
134  * complete row on disk, padding is inserted before a datum of this
135  * type so that it begins on the specified boundary. The alignment
136  * reference is the beginning of the first datum in the sequence.
137  *
138  * 'c' = CHAR alignment, ie no alignment needed.
139  * 's' = SHORT alignment (2 bytes on most machines).
140  * 'i' = INT alignment (4 bytes on most machines).
141  * 'd' = DOUBLE alignment (8 bytes on many machines, but by no means all).
142  *
143  * See include/access/tupmacs.h for the macros that compute these
144  * alignment requirements. Note also that we allow the nominal alignment
145  * to be violated when storing "packed" varlenas; the TOAST mechanism
146  * takes care of hiding that from most code.
147  *
148  * NOTE: for types used in system tables, it is critical that the
149  * size and alignment defined in pg_type agree with the way that the
150  * compiler will lay out the field in a struct representing a table row.
151  * ----------------
152  */
153  char typalign;
154 
155  /* ----------------
156  * typstorage tells if the type is prepared for toasting and what
157  * the default strategy for attributes of this type should be.
158  *
159  * 'p' PLAIN type not prepared for toasting
160  * 'e' EXTERNAL external storage possible, don't try to compress
161  * 'x' EXTENDED try to compress and store external if required
162  * 'm' MAIN like 'x' but try to keep in main tuple
163  * ----------------
164  */
165  char typstorage;
166 
167  /*
168  * This flag represents a "NOT NULL" constraint against this datatype.
169  *
170  * If true, the attnotnull column for a corresponding table column using
171  * this datatype will always enforce the NOT NULL constraint.
172  *
173  * Used primarily for domain types.
174  */
175  bool typnotnull;
176 
177  /*
178  * Domains use typbasetype to show the base (or domain) type that the
179  * domain is based on. Zero if the type is not a domain.
180  */
181  Oid typbasetype;
182 
183  /*
184  * Domains use typtypmod to record the typmod to be applied to their base
185  * type (-1 if base type does not use a typmod). -1 if this type is not a
186  * domain.
187  */
188  int32 typtypmod;
189 
190  /*
191  * typndims is the declared number of dimensions for an array domain type
192  * (i.e., typbasetype is an array type). Otherwise zero.
193  */
194  int32 typndims;
195 
196  /*
197  * Collation: 0 if type cannot use collations, DEFAULT_COLLATION_OID for
198  * collatable base types, possibly other OID for domains
199  */
200  Oid typcollation;
201 
202 #ifdef CATALOG_VARLEN /* variable-length fields start here */
203 
204  /*
205  * If typdefaultbin is not NULL, it is the nodeToString representation of
206  * a default expression for the type. Currently this is only used for
207  * domains.
208  */
209  pg_node_tree typdefaultbin;
210 
211  /*
212  * typdefault is NULL if the type has no associated default value. If
213  * typdefaultbin is not NULL, typdefault must contain a human-readable
214  * version of the default expression represented by typdefaultbin. If
215  * typdefaultbin is NULL and typdefault is not, then typdefault is the
216  * external representation of the type's default value, which may be fed
217  * to the type's input converter to produce a constant.
218  */
219  text typdefault;
220 
221  /*
222  * Access permissions
223  */
224  aclitem typacl[1];
225 #endif
signed short int16
Definition: c.h:245
unsigned int Oid
Definition: postgres_ext.h:31
FormData_pg_type
Definition: pg_type.h:226
signed int int32
Definition: c.h:246
Definition: c.h:487
Oid regproc
Definition: c.h:388
Definition: c.h:433
DATA ( insert  OID = 16(boolPGNSP PGUID 1 t b B t t\054 00 1000 boolin boolout boolrecv boolsend---c p f 0-1 0 0 _null_ _null_ _null_))
DESCR ( boolean,
'true'/'false'"   
)
DESCR ( "variable-length  string,
binary values escaped"   
)
DESCR ( "single character"  )
DESCR ( "63-byte type for storing system identifiers"  )
DESCR ( "~18 digit  integer,
8-byte storage"   
)
DESCR ( "-32 thousand to 32  thousand,
2-byte storage"   
)
DESCR ( "array of  int2,
used in system tables"   
)
DESCR ( "-2 billion to 2 billion  integer,
4-byte storage"   
)
DESCR ( "registered procedure"  )
DESCR ( "variable-length  string,
no limit specified"   
)
DESCR ( "object   identifieroid,
maximum 4 billion"   
)
DESCR ( block, offset,
physical location of tuple"   
)
DESCR ( "transaction id"  )
DESCR ( "command identifier  type,
sequence in transaction id"   
)
DESCR ( "XML content"  )
DESCR ( "string representing an internal node tree"  )
DESCR ( "multivariate ndistinct coefficients"  )
DESCR ( "multivariate dependencies"  )
DESCR ( "internal type for passing CollectedCommand )
DESCR ( "storage manager"  )
DESCR ( "geometric point '(x, y)'"  )
DESCR ( "geometric line segment '(pt1,pt2)'"  )
DESCR ( "geometric path '(pt1,...)'"  )
DESCR ( "geometric box '(lower left,upper right)'"  )
DESCR ( "geometric polygon '(pt1,...)'"  )
DESCR ( "geometric line"  )
DESCR ( "single-precision floating point  number,
4-byte storage"   
)
DESCR ( "double-precision floating point  number,
8-byte storage"   
)
DESCR ( absolute,
limited-range date and time(Unix system time)"   
)
DESCR ( relative,
limited-range time interval(Unix delta time)"   
)
DESCR ( abstime,abstime,
time interval  
)
DESCR ( ""  )
DESCR ( "geometric circle '(center,radius)'"  )
DESCR ( "monetary  amounts,
  $d,
ddd.cc"   
)
DESCR ( "XX:XX:XX:XX:XX:XX  ,
MAC address"   
)
DESCR ( "IP address/  netmask,
host  address,
netmask optional"   
)
DESCR ( "network IP address/  netmask,
network address"   
)
DESCR ( "XX:XX:XX:XX:XX:XX:XX:XX  ,
MAC address"   
)
DESCR ( "access control list"  )
DESCR ( charlength,
blank-padded  string,
fixed storage length  
)
DESCR ( varcharlength,
non-blank-padded  string,
variable storage length  
)
DESCR ( "date"  )
DESCR ( "time of day"  )
DESCR ( "date and time"  )
DESCR ( "date and time with time zone )
DESCR ( "@ <number> <units>  ,
time interval  
)
DESCR ( "time of day with time zone )
DESCR ( "fixed-length bit string )
DESCR ( "variable-length bit string )
DESCR ( numericprecision, decimal,
arbitrary precision number"   
)
DESCR ( "reference to cursor (portal name)"  )
DESCR ( "registered procedure (with args)"  )
DESCR ( "registered operator"  )
DESCR ( "registered operator (with args)"  )
DESCR ( "registered class"  )
DESCR ( "registered type"  )
DESCR ( "registered role"  )
DESCR ( "registered namespace"  )
DESCR ( "UUID datatype"  )
DESCR ( "PostgreSQL LSN datatype"  )
DESCR ( "text representation for text search"  )
DESCR ( "GiST index internal text representation for text search"  )
DESCR ( "query representation for text search"  )
DESCR ( "registered text search configuration"  )
DESCR ( "registered text search dictionary"  )
DESCR ( "Binary JSON"  )
DESCR ( "txid snapshot"  )
DESCR ( "range of integers"  )
DESCR ( "range of numerics"  )
DESCR ( "range of timestamps without time zone )
DESCR ( "range of timestamps with time zone )
DESCR ( "range of dates )
DESCR ( "range of bigints"  )

Variable Documentation

FormData_pg_type

Definition at line 226 of file pg_type.h.