Add missing postgresql functions

Signed-off-by: Matthew Peveler <matt.peveler@popsql.com>
pull/2748/head
Matthew Peveler 2021-11-03 18:12:54 -10:00
parent c23acaa3b7
commit c1c050eb61
1 changed files with 97 additions and 0 deletions

View File

@ -164,8 +164,11 @@ export const language = <languages.IMonarchLanguage>{
builtinFunctions: [ builtinFunctions: [
'abbrev', 'abbrev',
'abs', 'abs',
'acldefault',
'aclexplode',
'acos', 'acos',
'acosd', 'acosd',
'acosh',
'age', 'age',
'any', 'any',
'area', 'area',
@ -189,10 +192,12 @@ export const language = <languages.IMonarchLanguage>{
'ascii', 'ascii',
'asin', 'asin',
'asind', 'asind',
'asinh',
'atan', 'atan',
'atan2', 'atan2',
'atan2d', 'atan2d',
'atand', 'atand',
'atanh',
'avg', 'avg',
'bit', 'bit',
'bit_and', 'bit_and',
@ -204,7 +209,9 @@ export const language = <languages.IMonarchLanguage>{
'bool_or', 'bool_or',
'bound_box', 'bound_box',
'box', 'box',
'brin_desummarize_range',
'brin_summarize_new_values', 'brin_summarize_new_values',
'brin_summarize_range',
'broadcast', 'broadcast',
'btrim', 'btrim',
'cardinality', 'cardinality',
@ -227,6 +234,7 @@ export const language = <languages.IMonarchLanguage>{
'corr', 'corr',
'cos', 'cos',
'cosd', 'cosd',
'cosh',
'cot', 'cot',
'cotd', 'cotd',
'count', 'count',
@ -246,12 +254,17 @@ export const language = <languages.IMonarchLanguage>{
'current_user', 'current_user',
'currval', 'currval',
'cursor_to_xml', 'cursor_to_xml',
'cursor_to_xmlschema',
'date_bin', 'date_bin',
'date_part', 'date_part',
'date_trunc', 'date_trunc',
'database_to_xml',
'database_to_xml_and_xmlschema',
'database_to_xmlschema',
'decode', 'decode',
'degrees', 'degrees',
'dense_rank', 'dense_rank',
'diagonal',
'diameter', 'diameter',
'div', 'div',
'encode', 'encode',
@ -261,11 +274,14 @@ export const language = <languages.IMonarchLanguage>{
'every', 'every',
'exp', 'exp',
'extract', 'extract',
'factorial',
'family', 'family',
'first_value', 'first_value',
'floor', 'floor',
'format', 'format',
'format_type', 'format_type',
'gcd',
'gen_random_uuid',
'generate_series', 'generate_series',
'generate_subscripts', 'generate_subscripts',
'get_bit', 'get_bit',
@ -318,6 +334,7 @@ export const language = <languages.IMonarchLanguage>{
'json_strip_nulls', 'json_strip_nulls',
'json_to_record', 'json_to_record',
'json_to_recordset', 'json_to_recordset',
'json_to_tsvector',
'json_typeof', 'json_typeof',
'jsonb_agg', 'jsonb_agg',
'jsonb_array_elements', 'jsonb_array_elements',
@ -351,6 +368,7 @@ export const language = <languages.IMonarchLanguage>{
'jsonb_strip_nulls', 'jsonb_strip_nulls',
'jsonb_to_record', 'jsonb_to_record',
'jsonb_to_recordset', 'jsonb_to_recordset',
'jsonb_to_tsvector',
'jsonb_typeof', 'jsonb_typeof',
'justify_days', 'justify_days',
'justify_hours', 'justify_hours',
@ -358,6 +376,7 @@ export const language = <languages.IMonarchLanguage>{
'lag', 'lag',
'last_value', 'last_value',
'lastval', 'lastval',
'lcm',
'lead', 'lead',
'least', 'least',
'left', 'left',
@ -367,26 +386,32 @@ export const language = <languages.IMonarchLanguage>{
'localtime', 'localtime',
'localtimestamp', 'localtimestamp',
'log', 'log',
'log10',
'lower', 'lower',
'lower_inc', 'lower_inc',
'lower_inf', 'lower_inf',
'lpad', 'lpad',
'lseg', 'lseg',
'ltrim', 'ltrim',
'macaddr8_set7bit',
'make_date', 'make_date',
'make_interval', 'make_interval',
'make_time', 'make_time',
'make_timestamp', 'make_timestamp',
'make_timestamptz', 'make_timestamptz',
'makeaclitem',
'masklen', 'masklen',
'max', 'max',
'md5', 'md5',
'min', 'min',
'min_scale',
'mod', 'mod',
'mode', 'mode',
'multirange',
'netmask', 'netmask',
'network', 'network',
'nextval', 'nextval',
'normalize',
'now', 'now',
'npoints', 'npoints',
'nth_value', 'nth_value',
@ -416,7 +441,9 @@ export const language = <languages.IMonarchLanguage>{
'pg_blocking_pids', 'pg_blocking_pids',
'pg_cancel_backend', 'pg_cancel_backend',
'pg_client_encoding', 'pg_client_encoding',
'pg_collation_actual_version',
'pg_collation_is_visible', 'pg_collation_is_visible',
'pg_column_compression',
'pg_column_size', 'pg_column_size',
'pg_conf_load_time', 'pg_conf_load_time',
'pg_control_checkpoint', 'pg_control_checkpoint',
@ -424,18 +451,32 @@ export const language = <languages.IMonarchLanguage>{
'pg_control_recovery', 'pg_control_recovery',
'pg_control_system', 'pg_control_system',
'pg_conversion_is_visible', 'pg_conversion_is_visible',
'pg_copy_logical_replication_slot',
'pg_copy_physical_replication_slot',
'pg_create_logical_replication_slot', 'pg_create_logical_replication_slot',
'pg_create_physical_replication_slot', 'pg_create_physical_replication_slot',
'pg_create_restore_point', 'pg_create_restore_point',
'pg_current_logfile',
'pg_current_snapshot',
'pg_current_wal_flush_lsn',
'pg_current_wal_insert_lsn',
'pg_current_wal_lsn',
'pg_current_xact_id',
'pg_current_xact_id_if_assigned',
'pg_current_xlog_flush_location', 'pg_current_xlog_flush_location',
'pg_current_xlog_insert_location', 'pg_current_xlog_insert_location',
'pg_current_xlog_location', 'pg_current_xlog_location',
'pg_database_size', 'pg_database_size',
'pg_describe_object', 'pg_describe_object',
'pg_drop_replication_slot', 'pg_drop_replication_slot',
'pg_event_trigger_ddl_commands',
'pg_event_trigger_dropped_objects',
'pg_event_trigger_table_rewrite_oid',
'pg_event_trigger_table_rewrite_reason',
'pg_export_snapshot', 'pg_export_snapshot',
'pg_filenode_relation', 'pg_filenode_relation',
'pg_function_is_visible', 'pg_function_is_visible',
'pg_get_catalog_foreign_keys',
'pg_get_constraintdef', 'pg_get_constraintdef',
'pg_get_expr', 'pg_get_expr',
'pg_get_function_arguments', 'pg_get_function_arguments',
@ -448,12 +489,15 @@ export const language = <languages.IMonarchLanguage>{
'pg_get_owned_sequence', 'pg_get_owned_sequence',
'pg_get_ruledef', 'pg_get_ruledef',
'pg_get_serial_sequence', 'pg_get_serial_sequence',
'pg_get_statisticsobjdef',
'pg_get_triggerdef', 'pg_get_triggerdef',
'pg_get_userbyid', 'pg_get_userbyid',
'pg_get_viewdef', 'pg_get_viewdef',
'pg_get_wal_replay_pause_state',
'pg_has_role', 'pg_has_role',
'pg_identify_object', 'pg_identify_object',
'pg_identify_object_as_address', 'pg_identify_object_as_address',
'pg_import_system_collations',
'pg_index_column_has_property', 'pg_index_column_has_property',
'pg_index_has_property', 'pg_index_has_property',
'pg_indexam_has_property', 'pg_indexam_has_property',
@ -461,31 +505,46 @@ export const language = <languages.IMonarchLanguage>{
'pg_is_in_backup', 'pg_is_in_backup',
'pg_is_in_recovery', 'pg_is_in_recovery',
'pg_is_other_temp_schema', 'pg_is_other_temp_schema',
'pg_is_wal_replay_paused',
'pg_is_xlog_replay_paused', 'pg_is_xlog_replay_paused',
'pg_jit_available',
'pg_last_committed_xact', 'pg_last_committed_xact',
'pg_last_wal_receive_lsn',
'pg_last_wal_replay_lsn',
'pg_last_xact_replay_timestamp', 'pg_last_xact_replay_timestamp',
'pg_last_xlog_receive_location', 'pg_last_xlog_receive_location',
'pg_last_xlog_replay_location', 'pg_last_xlog_replay_location',
'pg_listening_channels', 'pg_listening_channels',
'pg_log_backend_memory_contexts',
'pg_logical_emit_message', 'pg_logical_emit_message',
'pg_logical_slot_get_binary_changes', 'pg_logical_slot_get_binary_changes',
'pg_logical_slot_get_changes', 'pg_logical_slot_get_changes',
'pg_logical_slot_peek_binary_changes', 'pg_logical_slot_peek_binary_changes',
'pg_logical_slot_peek_changes', 'pg_logical_slot_peek_changes',
'pg_ls_archive_statusdir',
'pg_ls_dir', 'pg_ls_dir',
'pg_ls_logdir',
'pg_ls_tmpdir',
'pg_ls_waldir',
'pg_mcv_list_items',
'pg_my_temp_schema', 'pg_my_temp_schema',
'pg_notification_queue_usage', 'pg_notification_queue_usage',
'pg_opclass_is_visible', 'pg_opclass_is_visible',
'pg_operator_is_visible', 'pg_operator_is_visible',
'pg_opfamily_is_visible', 'pg_opfamily_is_visible',
'pg_options_to_table', 'pg_options_to_table',
'pg_partition_ancestors',
'pg_partition_root',
'pg_partition_tree',
'pg_postmaster_start_time', 'pg_postmaster_start_time',
'pg_promote',
'pg_read_binary_file', 'pg_read_binary_file',
'pg_read_file', 'pg_read_file',
'pg_relation_filenode', 'pg_relation_filenode',
'pg_relation_filepath', 'pg_relation_filepath',
'pg_relation_size', 'pg_relation_size',
'pg_reload_conf', 'pg_reload_conf',
'pg_replication_origin_advance',
'pg_replication_origin_create', 'pg_replication_origin_create',
'pg_replication_origin_drop', 'pg_replication_origin_drop',
'pg_replication_origin_oid', 'pg_replication_origin_oid',
@ -496,15 +555,22 @@ export const language = <languages.IMonarchLanguage>{
'pg_replication_origin_session_setup', 'pg_replication_origin_session_setup',
'pg_replication_origin_xact_reset', 'pg_replication_origin_xact_reset',
'pg_replication_origin_xact_setup', 'pg_replication_origin_xact_setup',
'pg_replication_slot_advance',
'pg_rotate_logfile', 'pg_rotate_logfile',
'pg_safe_snapshot_blocking_pids',
'pg_size_bytes', 'pg_size_bytes',
'pg_size_pretty', 'pg_size_pretty',
'pg_sleep', 'pg_sleep',
'pg_sleep_for', 'pg_sleep_for',
'pg_sleep_until', 'pg_sleep_until',
'pg_snapshot_xip',
'pg_snapshot_xmax',
'pg_snapshot_xmin',
'pg_start_backup', 'pg_start_backup',
'pg_stat_file', 'pg_stat_file',
'pg_statistics_obj_is_visible',
'pg_stop_backup', 'pg_stop_backup',
'pg_switch_wal',
'pg_switch_xlog', 'pg_switch_xlog',
'pg_table_is_visible', 'pg_table_is_visible',
'pg_table_size', 'pg_table_size',
@ -524,7 +590,15 @@ export const language = <languages.IMonarchLanguage>{
'pg_ts_template_is_visible', 'pg_ts_template_is_visible',
'pg_type_is_visible', 'pg_type_is_visible',
'pg_typeof', 'pg_typeof',
'pg_visible_in_snapshot',
'pg_wal_lsn_diff',
'pg_wal_replay_pause',
'pg_wal_replay_resume',
'pg_walfile_name',
'pg_walfile_name_offset',
'pg_xact_commit_timestamp', 'pg_xact_commit_timestamp',
'pg_xact_commit_timestamp_origin',
'pg_xact_status',
'pg_xlog_location_diff', 'pg_xlog_location_diff',
'pg_xlog_replay_pause', 'pg_xlog_replay_pause',
'pg_xlog_replay_resume', 'pg_xlog_replay_resume',
@ -540,6 +614,8 @@ export const language = <languages.IMonarchLanguage>{
'power', 'power',
'pqserverversion', 'pqserverversion',
'query_to_xml', 'query_to_xml',
'query_to_xml_and_xmlschema',
'query_to_xmlschema',
'querytree', 'querytree',
'quote_ident', 'quote_ident',
'quote_literal', 'quote_literal',
@ -547,8 +623,11 @@ export const language = <languages.IMonarchLanguage>{
'radians', 'radians',
'radius', 'radius',
'random', 'random',
'range_agg',
'range_intersect_agg',
'range_merge', 'range_merge',
'rank', 'rank',
'regexp_match',
'regexp_matches', 'regexp_matches',
'regexp_replace', 'regexp_replace',
'regexp_split_to_array', 'regexp_split_to_array',
@ -573,6 +652,9 @@ export const language = <languages.IMonarchLanguage>{
'rpad', 'rpad',
'rtrim', 'rtrim',
'scale', 'scale',
'schema_to_xml',
'schema_to_xml_and_xmlschema',
'schema_to_xmlschema',
'session_user', 'session_user',
'set_bit', 'set_bit',
'set_byte', 'set_byte',
@ -581,13 +663,20 @@ export const language = <languages.IMonarchLanguage>{
'setseed', 'setseed',
'setval', 'setval',
'setweight', 'setweight',
'sha224',
'sha256',
'sha384',
'sha512',
'shobj_description', 'shobj_description',
'sign', 'sign',
'sin', 'sin',
'sind', 'sind',
'sinh',
'slope',
'split_part', 'split_part',
'sprintf', 'sprintf',
'sqrt', 'sqrt',
'starts_with',
'statement_timestamp', 'statement_timestamp',
'stddev', 'stddev',
'stddev_pop', 'stddev_pop',
@ -600,10 +689,13 @@ export const language = <languages.IMonarchLanguage>{
'substr', 'substr',
'substring', 'substring',
'sum', 'sum',
'suppress_redundant_updates_trigger',
'table_to_xml', 'table_to_xml',
'table_to_xml_and_xmlschema', 'table_to_xml_and_xmlschema',
'table_to_xmlschema',
'tan', 'tan',
'tand', 'tand',
'tanh',
'text', 'text',
'timeofday', 'timeofday',
'timezone', 'timezone',
@ -614,6 +706,7 @@ export const language = <languages.IMonarchLanguage>{
'to_json', 'to_json',
'to_number', 'to_number',
'to_regclass', 'to_regclass',
'to_regcollation',
'to_regnamespace', 'to_regnamespace',
'to_regoper', 'to_regoper',
'to_regoperator', 'to_regoperator',
@ -628,6 +721,7 @@ export const language = <languages.IMonarchLanguage>{
'translate', 'translate',
'trim', 'trim',
'trim_array', 'trim_array',
'trim_scale',
'trunc', 'trunc',
'ts_debug', 'ts_debug',
'ts_delete', 'ts_delete',
@ -645,10 +739,12 @@ export const language = <languages.IMonarchLanguage>{
'tsvector_update_trigger', 'tsvector_update_trigger',
'tsvector_update_trigger_column', 'tsvector_update_trigger_column',
'txid_current', 'txid_current',
'txid_current_if_assigned',
'txid_current_snapshot', 'txid_current_snapshot',
'txid_snapshot_xip', 'txid_snapshot_xip',
'txid_snapshot_xmax', 'txid_snapshot_xmax',
'txid_snapshot_xmin', 'txid_snapshot_xmin',
'txid_status',
'txid_visible_in_snapshot', 'txid_visible_in_snapshot',
'unistr', 'unistr',
'unnest', 'unnest',
@ -660,6 +756,7 @@ export const language = <languages.IMonarchLanguage>{
'var_samp', 'var_samp',
'variance', 'variance',
'version', 'version',
'websearch_to_tsquery',
'width', 'width',
'width_bucket', 'width_bucket',
'xml_is_well_formed', 'xml_is_well_formed',