# 内部函数
GaussDB中的下列函数仅用于内部逻辑功能实现，用户使用可能存在非预期结果，不建议使用。
- 选择率计算函数
  
  |    areajoinsel     |    areasel     | arraycontjoinsel |  arraycontsel  |  contjoinsel  |     contsel      |   eqjoinsel   |
  |---|---|---|---|---|---|---|
  | eqsel             | iclikejoinsel  | iclikesel         | icnlikejoinsel  | icnlikesel     | icregexeqjoinsel | icregexeqsel |
  | icregexnejoinsel | icregexnesel | likejoinsel       | likesel       | neqjoinsel     | neqsel          | nlikejoinsel  |
  | nlikesel          | positionjoinsel | positionsel      | regexeqjoinsel | regexeqsel    | regexnejoinsel   | regexnesel  |
  | scalargtjoinsel | scalargtsel    | scalarltjoinsel  | scalarltsel  | tsmatchjoinsel | tsmatchsel     | -             |
     
  
- 统计信息收集函数
  
  |     array_typanalyze      |         range_typanalyze         | ts_typanalyze | local_rto_stat | remote_rto_stat | gs_plan_trace_delete | gs_plan_trace_watch_sqlid |
  |---|---|---|---|---|---|---|
  | gs_plan_trace_show_sqlids | standby_statement_history_internal | -         | -            | -          | -                 | -                         |
     
  
- 排序内部功能函数
  
  | bpchar_sortsupport | bytea_sortsupport | date_sortsupport | numeric_sortsupport | timestamp_sortsupport | - | - |
  |---|---|---|---|---|---|---|
     
  
- 内部类型处理函数
  
  |           abstimerecv           |  euc_jis_2004_to_utf8  |           int2recv           |     line_recv     |      oidvectorrecv_extend      |         tidrecv         |         utf8_to_koi8u          |
  |---|---|---|---|---|---|---|
  | anyarray_recv                     | euc_jp_to_mic          | int2vectorrecv             | lseg_recv        | path_recv                      | time_recv                | utf8_to_shift_jis_2004       |
  | array_recv                        | euc_jp_to_sjis       | int4recv                     | macaddr_recv     | pg_node_tree_recv              | time_transform            | utf8_to_sjis                   |
  | ascii_to_mic                      | euc_jp_to_utf8       | int8recv                    | mic_to_ascii     | point_recv                     | timestamp_recv           | utf8_to_uhc                  |
  | ascii_to_utf8                   | euc_kr_to_mic         | internal_out               | mic_to_big5       | poly_recv                      | timestamp_transform      | utf8_to_win                   |
  | big5_to_euc_tw                   | euc_kr_to_utf8         | interval_recv              | mic_to_euc_cn     | pound_nexttoken               | timestamptz_recv         | uuid_recv                   |
  | big5_to_mic                        | euc_tw_to_big5        | interval_transform       | mic_to_euc_jp      | prsd_nexttoken                | timetz_recv               | varbit_recv                   |
  | big5_to_utf8                     | euc_tw_to_mic        | iso_to_koi8r              | mic_to_euc_kr     | range_recv                     | tintervalrecv          | varbit_transform             |
  | bit_recv                          | euc_tw_to_utf8      | iso_to_mic                | mic_to_euc_tw     | rawrecv                        | tsqueryrecv              | varchar_transform               |
  | boolrecv                         | float4recv           | iso_to_win1251            | mic_to_iso        | record_recv                   | tsvectorrecv             | varcharrecv                 |
  | box_recv                        | float8recv             | iso_to_win866             | mic_to_koi8r       | regclassrecv                  | txid_snapshot_recv       | void_recv                    |
  | bpcharrecv                      | gb18030_to_utf8       | iso8859_1_to_utf8          | mic_to_latin1   | regconfigrecv                 | uhc_to_utf8              | win_to_utf8                     |
  | btoidsortsupport                | gbk_to_utf8          | iso8859_to_utf8            | mic_to_latin2      | regdictionaryrecv              | unknownrecv               | win1250_to_latin2            |
  | bytearecv                       | -                         | johab_to_utf8              | mic_to_latin3    | regoperatorrecv                | utf8_to_ascii             | win1250_to_mic                |
  | byteawithoutorderwithequalcolrecv | gtsvector_compress  | json_recv                   | mic_to_latin4     | regoperrecv                  | utf8_to_big5            | win1251_to_iso               |
  | cash_recv                       | gtsvector_consistent   | koi8r_to_iso               | mic_to_sjis      | regprocedurerecv                | utf8_to_euc_cn           | win1251_to_koi8r              |
  | charrecv                         | gtsvector_decompress | koi8r_to_mic               | mic_to_win1250   | regprocrecv                   | utf8_to_euc_jis_2004     | win1251_to_mic                 |
  | cidr_recv                        | gtsvector_penalty     | koi8r_to_utf8             | mic_to_win1251     | regtyperecv                    | utf8_to_euc_jp            | win1251_to_win866             |
  | cidrecv                           | gtsvector_picksplit  | koi8r_to_win1251          | mic_to_win866      | reltimerecv                     | utf8_to_euc_kr          | win866_to_iso                 |
  | circle_recv                     | gtsvector_same       | koi8r_to_win866             | namerecv         | shift_jis_2004_to_euc_jis_2004 | utf8_to_euc_tw           | win866_to_koi8r              |
  | cstring_recv                      | gtsvector_union        | koi8u_to_utf8               | ngram_nexttoken    | shift_jis_2004_to_utf8        | utf8_to_gb18030         | win866_to_mic                 |
  | date_recv                         | hll_recv              | latin1_to_mic              | numeric_recv      | sjis_to_euc_jp                | utf8_to_gbk              | win866_to_win1251              |
  | domain_recv                       | hll_trans_recv        | latin2_to_mic             | numeric_transform  | sjis_to_mic                    | utf8_to_iso8859           | xidrecv                       |
  | euc_cn_to_mic                      | -                     | latin2_to_win1250         | nvarchar2recv    | sjis_to_utf8                  | utf8_to_iso8859_1       | xidrecv4                      |
  | euc_cn_to_utf8                  | inet_recv             | latin3_to_mic              | oidrecv          | smalldatetime_recv              | utf8_to_johab           | xml_recv                      |
  | euc_jis_2004_to_shift_jis_2004    | int1recv             | latin4_to_mic              | oidvectorrecv      | textrecv                        | utf8_to_koi8r            | -                               |
  | numeric_bool                       | int2vectorin_extend     | int2vectorout_extend          | int2vectorrecv_extend | int2vectorsend_extend             | int8_accum                 | large_seq_rollback_ntree       |
  | large_seq_upgrade_ntree           | int16eq               | int16ge                  | int16gt          | int16in                       | int16le                    | int16lt                      |
  | int16mi                             | int16mul              | int16ne                      | int16out             | int16pl                         | int16recv                   | int16send                     |
  | int16_bool                        | i16toi1               | anyset_in                    | anyset_out          | btint2setcmp                    | btint4setcmp             | btint8setcmp                    |
  | btsetcmp                         | btsetint2cmp         | btsetint4cmp               | btsetint8cmp      | btsetsortsupport              | float4                    | float8                        |
  | hashsetint                        | hashsettext         | int2                      | int2seteq       | int2setge                    | int2setgt                | int2setle                       |
  | int2setlt                       | int2setne              | int4                       | int4seteq           | int4setge                      | int4setgt                 | int4setle                   |
  | int4setlt                       | int4setne                | int8                       | int8seteq         | int8setge                       | int8setgt                  | int8setle                     |
  | int8setlt                         | int8setne            | set                       | set_in           | set_out                       | set_recv                 | set_send                       |
  | seteq                           | setge                 | setgt                      | setint2eq         | setint2ge                     | setint2gt               | setint2le                    |
  | setint2lt                       | setint2ne            | setint4eq                 | setint4ge        | setint4gt                      | setint4le               | setint4lt                      |
  | setint4ne                          | setint8eq              | setint8ge                    | setint8gt          | setint8le                         | setint8lt                 | setint8ne                     |
  | setle                          | setlt                 | setne                      | settexteq        | settextge                    | settextgt                | settextle                     |
  | settextlt                       | settextne               | settobpchar                | settonumber      | settonvarchar2                  | settotext                | settovarchar                   |
  | textseteq                        | textsetge             | textsetgt                 | textsetle           | textsetlt                      | textsetne               | gb18030_2022_to_utf8            |
  | utf8_to_gb18030_2022             | array_to_nesttable   | array_to_indexby_int_table | nesttable_to_array | indexbytableint_to_array     | array_to_nesttable         | array_to_indexby_int_table  |
  | zhs16gbk_to_utf8                 | utf8_to_zhs16gbk         | zhs16gbk_to_gb18030          | gb18030_to_zhs16gbk  | zhs16gbk_to_gb18030_2022        | gb18030_2022_to_zhs16gbk | -                               |
     
  
- 聚合操作内部函数
  
  |           array_agg_finalfn            |         array_agg_transfn         |     bytea_string_agg_finalfn      |   bytea_string_agg_transfn    |     date_list_agg_noarg2_transfn     |      date_list_agg_transfn       | float4_list_agg_noarg2_transfn |
  |---|---|---|---|---|---|---|
  | float4_list_agg_transfn               | float8_list_agg_noarg2_transfn | float8_list_agg_transfn         | int2_list_agg_noarg2_transfn | int2_list_agg_transfn                 | int4_list_agg_noarg2_transfn      | int4_list_agg_transfn            |
  | int8_list_agg_noarg2_transfn         | int8_list_agg_transfn           | interval_list_agg_noarg2_transfn  | interval_list_agg_transfn      | list_agg_finalfn                       | list_agg_noarg2_transfn           | list_agg_transfn                |
  | median                              | median_float8_finalfn            | median_interval_finalfn          | median_transfn                 | mode_final                           | numeric_list_agg_noarg2_transfn   | numeric_list_agg_transfn           |
  | ordered_set_transition                | percentile_cont_float8_final      | percentile_cont_interval_final | string_agg_finalfn             | string_agg_transfn                      | timestamp_list_agg_noarg2_transfn | timestamp_list_agg_transfn        |
  | timestamptz_list_agg_noarg2_transfn | timestamptz_list_agg_transfn   | checksumtext_agg_transfn         | json_agg_transfn              | json_agg_finalfn               | json_object_agg_transfn            | json_object_agg_finalfn         |
  | datea_list_agg_transfn                 | datea_list_agg_noarg2_transfn     | int1_list_agg_noarg2_transfn     | int1_list_agg_transfn        | smalldatetime_list_agg_noarg2_transfn | smalldatetime_list_agg_transfn   | rowid_list_agg_noarg2_transfn     |
  | rowid_list_agg_transfn               | -                                | -                              | -                             | -                                    | -                                | -                                 |
     
  
- 哈希内部功能函数
  
  | hashbeginscan | hashbuild | hashbuildempty | hashbulkdelete | hashcostestimate | hashendscan |   hashgetbitmap   |
  |---|---|---|---|---|---|---|
  | hashgettuple  | hashinsert  | hashmarkpos      | hashmerge       | hashrescan        | hashrestrpos | hashvacuumcleanup |
  | hashvarlena    | jsonb_hash | datea_hash      | rowid_hash     | -               | -            | -                 |
     
  
- Btree索引内部功能函数
  
  |     cbtreebuild     | cbtreecanreturn  | cbtreecostestimate |  cbtreegetbitmap   |  cbtreegettuple   |     btbeginscan      |       btbuild        |
  |---|---|---|---|---|---|---|
  | btbuildempty      | btbulkdelete        | btcanreturn       | btcostestimate    | btendscan           | btfloat4sortsupport | btfloat8sortsupport |
  | btgetbitmap        | btgettuple          | btinsert          | btint2sortsupport | btint4sortsupport | btint8sortsupport   | btmarkpos          |
  | btmerge            | btnamesortsupport | btrescan           | btrestrpos       | bttextsortsupport   | btvacuumcleanup     | cbtreeoptions     |
  | btvarstrequalimag | -                 | -                | -                  | -                | -                 | -                   |
     
  
- UGIN索引内部函数
  
  |        ugininsert        |   uginbeginscan    |   ugingetbitmap    | uginrescan  |       uginendscan       |       uginbuild        |   uginbuildempty    |
  |---|---|---|---|---|---|---|
  | uginbulkdelete           | uginvacuumcleanup | ugincostestimate | uginoptions | ugin_extract_value_trgm | ugin_extract_query_trgm | ugin_trgm_consistent |
  | ugin_trgm_triconsistent | -                 | -                 | -           | -                       | -                     | -                     |
     
  
- GIN索引内部功能函数
  
  |  gin_cmp_prefix   | gin_extract_tsquery |   gin_tsquery_consistent   | gin_tsquery_triconsistent |   ginarrayconsistent    |       ginarrayextract        |  ginarraytriconsistent  |
  |---|---|---|---|---|---|---|
  | ginbeginscan      | ginbuild           | ginbuildempty            | ginbulkdelete              | gincostestimate         | ginendscan                  | gingetbitmap              |
  | gininsert       | ginmarkpos          | ginmerge                  | ginqueryarrayextract       | ginrescan                | ginrestrpos                 | ginvacuumcleanup        |
  | cginbuild        | cgingetbitmap       | gin_consistent_jsonb_hash | gin_triconsistent_jsonb_hash  | gin_extract_jsonb_hash | gin_extract_jsonb_query_hash | gin_triconsistent_jsonb |
  | gin_compare_jsonb | gin_extract_jsonb   | gin_extract_jsonb_query | gin_consistent_jsonb     | -                       | -                            | -                        |
     
  
- GiST索引内部功能函数
  
  |     gist_box_compress     |   gist_box_consistent    | gist_box_decompress  |    gist_box_penalty     |    gist_box_picksplit    |   gist_box_same    |     gist_box_union      |
  |---|---|---|---|---|---|---|
  | gist_circle_compress       | gist_circle_consistent | gist_point_compress  | gist_point_consistent      | gist_point_distance       | gist_poly_compress | gist_poly_consistent  |
  | gistbeginscan              | gistbuild             | gistbuildempty        | gistbulkdelete          | gistcostestimate         | gistendscan          | gistgetbitmap        |
  | gistinsert               | gistmarkpos           | gistmerge             | gistrescan               | gistrestrpos              | gistvacuumcleanup   | range_gist_compress |
  | range_gist_decompress   | range_gist_penalty        | range_gist_picksplit | range_gist_same          | range_gist_union        | spg_kd_choose     | spg_kd_config          |
  | spg_kd_picksplit         | spg_quad_choose          | spg_quad_config       | spg_quad_inner_consistent | spg_quad_leaf_consistent | spg_quad_picksplit  | spg_text_choose        |
  | spg_text_inner_consistent | spg_text_leaf_consistent | spg_text_picksplit    | spgbeginscan             | spgbuild                    | spgbuildempty        | spgbulkdelete         |
  | spgcostestimate          | spgendscan            | spggetbitmap          | spggettuple             | spginsert                  | spgmarkpos         | spgmerge             |
  | spgrestrpos               | spgvacuumcleanup         | -                    | -                          | -                        | -                 | -                       |
     
  
- Psort索引内部函数
  
  | psortbuild | psortcanreturn | psortcostestimate | psortgetbitmap | psortgettuple | - | - |
  |---|---|---|---|---|---|---|
     
  
- Ubtree索引内部函数
  
  | ubtbeginscan |     ubtbuild      | ubtbuildempty | ubtbulkdelete | ubtcanreturn | ubtcostestimate | ubtendscan  |
  |---|---|---|---|---|---|---|
  | ubtgetbitmap  | ubtgettuple       | ubtinsert        | ubtmarkpos   | ubtmerge     | ubtoptions      | ubtrescan |
  | ubtrestrpos | ubtvacuumcleanup | -               | -           | -           | -                | -           |
     
  
- BM25索引内部函数（当前版本不支持）
  
  | gs_bm25beginscan |  gs_bm25build  |   gs_bm25buildempty   | gs_bm25bulkdelete | gs_bm25insert | gs_bm25costestimate | gs_bm25endscan |
  |---|---|---|---|---|---|---|
  | gs_bm25options   | gs_bm25gettuple | gs_bm25vacuumcleanup | gs_bm25rescan     | -             | -                     | -               |
     
  
- plpgsql内部函数
  
  | plpgsql_inline_handler | - | - | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- 外表相关内部函数
  
  | dist_fdw_handler | roach_handler | streaming_fdw_handler | dist_fdw_validator | file_fdw_handler | file_fdw_validator | log_fdw_handler |
  |---|---|---|---|---|---|---|
  | gc_fdw_handler   | gc_fdw_validator | dblink_fdw_handler      | dblink_fdw_validator | -                   | -                    | -                  |
     
  
- 数据倾斜优化相关内部函数
  
  | distributed_count | - | - | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- 表统计信息相关内部函数
  
  | pgxc_get_stat_dirty_tables | pgxc_stat_dirty_tables | get_global_stat_all_tables | get_summary_stat_all_tables | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- 远程读取数据函数
  - gs_read_block_from_remote 用于读取非段页式表文件的页面。默认只有初始化用户可以查看，其余用户需要赋权后才可以使用。
  
  - gs_read_segment_block_from_remote 用于读取段页式表文件的页面。默认只有初始化用户可以查看，其余用户需要赋权后才可以使用。
   
- 远程读取文件函数
  - gs_read_file_size_from_remote 用于读取指定文件的大小，gs_repair_file函数修复文件时，要先获取远端关于这个文件的大小，用于校验本地文件缺失的文件信息，然后将缺失的文件逐个修复。默认只有初始化用户可以查看，其余用户需要赋权后才可以使用。
  
  - gs_read_file_from_remote 用于读取指定的文件，gs_repair_file利用gs_read_file_size_from_remote函数获取文件大小后，依赖这个函数将远端文件逐段读取。默认只有初始化用户可以查看，其余用户需要赋权后才可以使用。
   
- 以备DN实例增量重建其他备或级联备DN实例辅助函数
  - gs_standby_incremental_filemap_create用于创建备DN增量重建临时filemap文件，用于存储当次增量重建需传输的数据路径与大小。只有初始化用户且application为gs_rewind时可以调用。
  
  - gs_standby_incremental_filemap_insert用于向指定临时filemap文件中插入文件信息，指定文件的路径、传输起始点、单次传输数据长度和rebuild标志位。只有初始化用户且application为gs_rewind时可以调用。
  
  - gs_standby_incremental_filemap_execute用于获取指定临时filemap文件中存储的文件信息并删除指定filemap，用于备DN增量重建的数据传输。只有初始化用户且application为gs_rewind时可以调用。
   
- 段页式获取远程信息函数
  
  | remote_gs_seg_get_datafiles | remote_gs_seg_get_extents | remote_gs_seg_get_segment | remote_gs_seg_get_spc_extents | remote_gs_seg_spc_segments | remote_segment_space_info | - |
  |---|---|---|---|---|---|---|
     
  
- 账本数据库函数
  
  | get_dn_hist_relhash | - | - | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- 其他函数
  
  | to_datea | sysdate_a | get_char_max_length | to_datea_internal | gs_get_part_relfilenode_id | gs_check_internal | - |
  |---|---|---|---|---|---|---|
     
  
- 视图相关引用函数
  
  | adm_hist_sqlstat_func | adm_hist_sqlstat_idlog_func | adm_hist_sqltext_func | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- gs_txn_snapshot系统表维护函数 gs_insert_delete_txn_snapshot用于分布式GTM-Lite模式下维护全局各节点gs_txn_snapshot系统表，只有系统管理员用户才能调用。
  
- xmltype类型相关函数
  
  | isschemavalid(不可用) | - | - | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- 在线创建与删除索引内部函数
  
  | gs_mark_indisvalid | gs_mark_indisvalid_false | - | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- pivot相关函数
  
  | pivot_anyelement |   pivot_bit    |   pivot_bool    |  pivot_bpchar   |     pivot_bytea      |    pivot_date    |   pivot_float4   |
  |---|---|---|---|---|---|---|
  | pivot_float8     | pivot_hll      | pivot_int1       | pivot_int2      | pivot_int4            | pivot_int8      | pivot_interval |
  | pivot_json       | pivot_money   | pivot_numeric   | pivot_oid      | pivot_smalldatetime | pivot_tdigestdata | pivot_text      |
  | pivot_tid      | pivot_time   | pivot_datea      | pivot_timestamp | pivot_timestamptz    | pivot_timetz    | pivot_xml       |
  | pivot_char       | pivot_varchar | pivot_nvarchar2 | pivot_raw      | pivot_clob            | pivot_abstime    | pivot_reltime    |
  | pivot_blob     | pivot_rowid  | pivot_varbit     | -              | -                  | -               | -               |
     
  
- subtype相关函数
  
  | subtype_in | subtype_recv | - | - | - | - | - |
  |---|---|---|---|---|---|---|
     
  
- nesttable相关函数
  
  |  nesttable_in  | nesttable_out | nesttable_count |   nesttable_delete   |       nesttable_eq       | nesttable_except | nesttable_except_distinct |
  |---|---|---|---|---|---|---|
  | nesttable_exists | nesttable_extend  | nesttable_first  | nesttable_intersect | nesttable_intersect_distinct | nesttable_last  | nesttable_limit         |
  | nesttable_ne   | nesttable_next  | nesttable_prior  | nesttable_to_array | nesttable_trim             | nesttable_union   | nesttable_union_distinct   |
     
  

- indexbytable相关函数
  
  |    indexbytable_count     |     indexbytable_in      |     indexbytable_out     |   indexbytableint_delete    |  indexbytableint_exists   |  indexbytableint_first   |   indexbytableint_last   |
  |---|---|---|---|---|---|---|
  | indexbytableint_next   | indexbytableint_prior    | indexbytableint_to_array | indexbytablevarchar_delete | indexbytablevarchar_exists | indexbytablevarchar_first | indexbytablevarchar_last |
  | indexbytablevarchar_next | indexbytablevarchar_prior | -                       | -                           | -                            | -                          | -                         |
     
  
- 消息队列相关函数
  
  |          mq_clear           | mq_get_queue  | mq_query | mq_register_pull | mq_send_message | mq_sync | mq_sync_ccn |
  |---|---|---|---|---|---|---|
  | mq_transaction_processing | mq_unregister | -        | -                 | -              | -     | -            |
     
  
- 排序计算相关函数
  
  | tdigest_in | tdigest_out | calculate_quantile_of | calculate_value_at | tdigest_merge | tdigest_merge_to_one | tdigest_mergep |
  |---|---|---|---|---|---|---|
     
  

- GsIVFFLAT索引内部函数
  
  |  ivfflatbeginscan  |   ivfflatbuild   |    ivfflatbuildempty     | ivfflatbulkdelete | ivfflatinsert | ivfflatcostestimate | ivfflatendscan |
  |---|---|---|---|---|---|---|
  | ivfflatoptions | ivfflatgettuple | ivfflatvacuumcleanup | ivfflatrescan    | -               | -                   | -             |
     
  
- GsDiskANN索引内部函数
  
  | diskannbeginscan |  diskannbuild  |    diskannbuildempty    | diskannbulkdelete | diskanninsert | diskanncostestimate | diskannendscan |
  |---|---|---|---|---|---|---|
  | diskannoptions   | diskanngettuple | diskannvacuumcleanup | diskannrescan      | -             | -                    | -             |
     
  
 
