# `pglast.printers` — Specialized printer functions

This module implements the specialized functions that define how a particular `Node` will be serialized.

pglast.printers.NODE_PRINTERS = {(<class 'pglast.ast.A_Indirection'>, <class 'pglast.ast.A_Star'>): <function a_indirection_a_star>, (<class 'pglast.ast.A_Indirection'>, <class 'pglast.ast.ColumnRef'>): <function a_indirection_column_ref>, (<class 'pglast.ast.A_Indirection'>, <class 'pglast.ast.FuncCall'>): <function a_indirection_func_call>, (<class 'pglast.ast.A_Indirection'>, <class 'pglast.ast.String'>): <function a_indirection_field>, (<class 'pglast.ast.AlterExtensionStmt'>, <class 'pglast.ast.DefElem'>): <function alter_extension_stmt_def_elem>, (<class 'pglast.ast.AlterFdwStmt'>, <class 'pglast.ast.DefElem'>): <function alter_fdw_stmt_def_elem>, (<class 'pglast.ast.AlterFunctionStmt'>, <class 'pglast.ast.DefElem'>): <function create_function_option>, (<class 'pglast.ast.AlterObjectSchemaStmt'>, <class 'pglast.ast.ObjectWithArgs'>): <function alter_object_schema_stmt_object_with_args>, (<class 'pglast.ast.AlterOperatorStmt'>, <class 'pglast.ast.DefElem'>): <function alter_operator_stmt_def_elem>, (<class 'pglast.ast.AlterOperatorStmt'>, <class 'pglast.ast.ObjectWithArgs'>): <function alter_operator_stmt_object_with_args>, (<class 'pglast.ast.AlterOwnerStmt'>, <class 'pglast.ast.ObjectWithArgs'>): <function alter_owner_stmt_object_with_args>, (<class 'pglast.ast.AlterRoleStmt'>, <class 'pglast.ast.DefElem'>): <function create_or_alter_role_option>, (<class 'pglast.ast.AlterSeqStmt'>, <class 'pglast.ast.DefElem'>): <function create_seq_stmt_def_elem>, (<class 'pglast.ast.AlterSubscriptionStmt'>, <class 'pglast.ast.DefElem'>): <function create_subscription_stmt_stmt_def_elem>, (<class 'pglast.ast.AlterTableCmd'>, <class 'pglast.ast.DefElem'>): <function alter_table_cmd_def_elem>, (<class 'pglast.ast.AlterTableStmt'>, <class 'pglast.ast.RangeVar'>): <function range_var>, (<class 'pglast.ast.CTECycleClause'>, <class 'pglast.ast.TypeCast'>): <function cte_cycle_clause_type_cast>, (<class 'pglast.ast.ColumnDef'>, <class 'pglast.ast.DefElem'>): <function create_fdw_stmt_def_elem>, (<class 'pglast.ast.CommentStmt'>, <class 'pglast.ast.ObjectWithArgs'>): <function comment_stmt_object_with_args>, (<class 'pglast.ast.CompositeTypeStmt'>, <class 'pglast.ast.RangeVar'>): <function composite_type_stmt_range_var>, (<class 'pglast.ast.Constraint'>, <class 'pglast.ast.DefElem'>): <function create_seq_stmt_def_elem>, (<class 'pglast.ast.CopyStmt'>, <class 'pglast.ast.DefElem'>): <function copy_stmt_def_elem>, (<class 'pglast.ast.CreateEventTrigStmt'>, <class 'pglast.ast.DefElem'>): <function create_event_trig_stmt_def_elem>, (<class 'pglast.ast.CreateExtensionStmt'>, <class 'pglast.ast.DefElem'>): <function create_extension_stmt_def_elem>, (<class 'pglast.ast.CreateFdwStmt'>, <class 'pglast.ast.DefElem'>): <function create_fdw_stmt_def_elem>, (<class 'pglast.ast.CreateForeignServerStmt'>, <class 'pglast.ast.DefElem'>): <function create_foreign_table_stmt_def_elem>, (<class 'pglast.ast.CreateForeignTableStmt'>, <class 'pglast.ast.DefElem'>): <function create_foreign_table_stmt_def_elem>, (<class 'pglast.ast.CreateFunctionStmt'>, <class 'pglast.ast.DefElem'>): <function create_function_option>, (<class 'pglast.ast.CreatePublicationStmt'>, <class 'pglast.ast.DefElem'>): <function alter_table_cmd_def_elem>, (<class 'pglast.ast.CreateRoleStmt'>, <class 'pglast.ast.DefElem'>): <function create_or_alter_role_option>, (<class 'pglast.ast.CreateSeqStmt'>, <class 'pglast.ast.DefElem'>): <function create_seq_stmt_def_elem>, (<class 'pglast.ast.CreateStmt'>, <class 'pglast.ast.DefElem'>): <function alter_table_cmd_def_elem>, (<class 'pglast.ast.CreateSubscriptionStmt'>, <class 'pglast.ast.DefElem'>): <function create_subscription_stmt_stmt_def_elem>, (<class 'pglast.ast.CreateUserMappingStmt'>, <class 'pglast.ast.DefElem'>): <function create_fdw_stmt_def_elem>, (<class 'pglast.ast.CreatedbStmt'>, <class 'pglast.ast.DefElem'>): <function create_db_stmt_def_elem>, (<class 'pglast.ast.DefineStmt'>, <class 'pglast.ast.DefElem'>): <function define_stmt_def_elem>, (<class 'pglast.ast.DoStmt'>, <class 'pglast.ast.DefElem'>): <function create_function_option>, (<class 'pglast.ast.DropStmt'>, <class 'pglast.ast.ObjectWithArgs'>): <function drop_stmt_object_with_args>, (<class 'pglast.ast.ExplainStmt'>, <class 'pglast.ast.DefElem'>): <function explain_stmt_def_elem>, (<class 'pglast.ast.FuncCall'>, <class 'pglast.ast.WindowDef'>): <function func_call_window_def>, (<class 'pglast.ast.GrantRoleStmt'>, <class 'pglast.ast.DefElem'>): <function grant_role_stmt_opt>, (<class 'pglast.ast.IndexStmt'>, <class 'pglast.ast.DefElem'>): <function alter_table_cmd_def_elem>, (<class 'pglast.ast.IntoClause'>, <class 'pglast.ast.DefElem'>): <function alter_table_cmd_def_elem>, (<class 'pglast.ast.MergeWhenClause'>, <class 'pglast.ast.ResTarget'>): <function update_stmt_res_target>, (<class 'pglast.ast.OnConflictClause'>, <class 'pglast.ast.ResTarget'>): <function update_stmt_res_target>, (<class 'pglast.ast.RangeTableFunc'>, <class 'pglast.ast.ResTarget'>): <function range_table_func_res_target>, (<class 'pglast.ast.ReindexStmt'>, <class 'pglast.ast.DefElem'>): <function reindex_stmt_def_elem>, (<class 'pglast.ast.RenameStmt'>, <class 'pglast.ast.RangeVar'>): <function rename_stmt_range_var>, (<class 'pglast.ast.TransactionStmt'>, <class 'pglast.ast.DefElem'>): <function transaction_stmt_def_elem>, (<class 'pglast.ast.UpdateStmt'>, <class 'pglast.ast.ResTarget'>): <function update_stmt_res_target>, (<class 'pglast.ast.VacuumStmt'>, <class 'pglast.ast.DefElem'>): <function vacuum_stmt_def_elem>, (<class 'pglast.ast.VariableSetStmt'>, <class 'pglast.ast.TypeCast'>): <function variable_set_stmt_type_cast>, (<class 'pglast.ast.ViewStmt'>, <class 'pglast.ast.DefElem'>): <function view_stmt_def_elem>, <class 'pglast.ast.A_ArrayExpr'>: <function a_array_expr>, <class 'pglast.ast.A_Const'>: <function a_const>, <class 'pglast.ast.A_Expr'>: <function a_expr>, <class 'pglast.ast.A_Indices'>: <function a_indices>, <class 'pglast.ast.A_Indirection'>: <function a_indirection>, <class 'pglast.ast.A_Star'>: <function a_star>, <class 'pglast.ast.AccessPriv'>: <function access_priv>, <class 'pglast.ast.Alias'>: <function alias>, <class 'pglast.ast.AlterCollationStmt'>: <function alter_collation_stmt>, <class 'pglast.ast.AlterDatabaseSetStmt'>: <function alter_database_set_stmt>, <class 'pglast.ast.AlterDatabaseStmt'>: <function alter_database_stmt>, <class 'pglast.ast.AlterDefaultPrivilegesStmt'>: <function alter_default_privileges_stmt>, <class 'pglast.ast.AlterDomainStmt'>: <function alter_domain_stmt>, <class 'pglast.ast.AlterEnumStmt'>: <function alter_enum_stmt>, <class 'pglast.ast.AlterEventTrigStmt'>: <function alter_event_trig_stmt>, <class 'pglast.ast.AlterExtensionContentsStmt'>: <function alter_extension_contents_stmt>, <class 'pglast.ast.AlterExtensionStmt'>: <function alter_extension_stmt>, <class 'pglast.ast.AlterFdwStmt'>: <function alter_fdw_stmt>, <class 'pglast.ast.AlterForeignServerStmt'>: <function alter_foreign_server_stmt>, <class 'pglast.ast.AlterFunctionStmt'>: <function alter_function_stmt>, <class 'pglast.ast.AlterObjectSchemaStmt'>: <function alter_object_schema_stmt>, <class 'pglast.ast.AlterOpFamilyStmt'>: <function alter_op_family_stmt>, <class 'pglast.ast.AlterOperatorStmt'>: <function alter_operator_stmt>, <class 'pglast.ast.AlterOwnerStmt'>: <function alter_owner_stmt>, <class 'pglast.ast.AlterPolicyStmt'>: <function alter_policy_stmt>, <class 'pglast.ast.AlterPublicationStmt'>: <function alter_publication_stmt>, <class 'pglast.ast.AlterRoleSetStmt'>: <function alter_role_set_stmt>, <class 'pglast.ast.AlterRoleStmt'>: <function alter_role_stmt>, <class 'pglast.ast.AlterSeqStmt'>: <function alter_seq_stmt>, <class 'pglast.ast.AlterStatsStmt'>: <function alter_stats_stmt>, <class 'pglast.ast.AlterSubscriptionStmt'>: <function alter_subscription_stmt>, <class 'pglast.ast.AlterTSConfigurationStmt'>: <function alter_ts_configuration_stmt>, <class 'pglast.ast.AlterTSDictionaryStmt'>: <function alter_ts_dictionary_stmt>, <class 'pglast.ast.AlterTableCmd'>: <function alter_table_cmd>, <class 'pglast.ast.AlterTableMoveAllStmt'>: <function alter_table_move_all_stmt>, <class 'pglast.ast.AlterTableSpaceOptionsStmt'>: <function alter_tablespace_options_stmt>, <class 'pglast.ast.AlterTableStmt'>: <function alter_table_stmt>, <class 'pglast.ast.AlterTypeStmt'>: <function alter_type_stmt>, <class 'pglast.ast.AlterUserMappingStmt'>: <function alter_user_mapping_stmt>, <class 'pglast.ast.BitString'>: <function bitstring>, <class 'pglast.ast.BoolExpr'>: <function bool_expr>, <class 'pglast.ast.Boolean'>: <function boolean>, <class 'pglast.ast.BooleanTest'>: <function boolean_test>, <class 'pglast.ast.CTECycleClause'>: <function cte_cycle_clause>, <class 'pglast.ast.CTESearchClause'>: <function cte_search_clause>, <class 'pglast.ast.CallStmt'>: <function call_stmt>, <class 'pglast.ast.CaseExpr'>: <function case_expr>, <class 'pglast.ast.CaseWhen'>: <function case_when>, <class 'pglast.ast.CheckPointStmt'>: <function check_point_stmt>, <class 'pglast.ast.ClosePortalStmt'>: <function close_portal_stmt>, <class 'pglast.ast.ClusterStmt'>: <function cluster_stmt>, <class 'pglast.ast.CoalesceExpr'>: <function coalesce_expr>, <class 'pglast.ast.CollateClause'>: <function collate_clause>, <class 'pglast.ast.ColumnDef'>: <function column_def>, <class 'pglast.ast.ColumnRef'>: <function column_ref>, <class 'pglast.ast.CommentStmt'>: <function comment_stmt>, <class 'pglast.ast.CommonTableExpr'>: <function common_table_expr>, <class 'pglast.ast.CompositeTypeStmt'>: <function composite_type_stmt>, <class 'pglast.ast.Constraint'>: <function constraint>, <class 'pglast.ast.ConstraintsSetStmt'>: <function constraints_set_stmt>, <class 'pglast.ast.CopyStmt'>: <function copy_stmt>, <class 'pglast.ast.CreateAmStmt'>: <function create_am_stmt>, <class 'pglast.ast.CreateCastStmt'>: <function create_cast_stmt>, <class 'pglast.ast.CreateConversionStmt'>: <function create_conversion_stmt>, <class 'pglast.ast.CreateDomainStmt'>: <function create_domain_stmt>, <class 'pglast.ast.CreateEnumStmt'>: <function create_enum_stmt>, <class 'pglast.ast.CreateEventTrigStmt'>: <function create_event_trig_stmt>, <class 'pglast.ast.CreateExtensionStmt'>: <function create_extension_stmt>, <class 'pglast.ast.CreateFdwStmt'>: <function create_fdw_stmt>, <class 'pglast.ast.CreateForeignServerStmt'>: <function create_foreign_server_stmt>, <class 'pglast.ast.CreateForeignTableStmt'>: <function create_foreign_table_stmt>, <class 'pglast.ast.CreateFunctionStmt'>: <function create_function_stmt>, <class 'pglast.ast.CreateOpClassItem'>: <function create_opclass_item>, <class 'pglast.ast.CreateOpClassStmt'>: <function create_opclass_stmt>, <class 'pglast.ast.CreateOpFamilyStmt'>: <function create_op_family_stmt>, <class 'pglast.ast.CreatePLangStmt'>: <function create_plang_stmt>, <class 'pglast.ast.CreatePolicyStmt'>: <function create_policy_stmt>, <class 'pglast.ast.CreatePublicationStmt'>: <function create_publication_stmt>, <class 'pglast.ast.CreateRangeStmt'>: <function create_range_stmt>, <class 'pglast.ast.CreateRoleStmt'>: <function create_role_stmt>, <class 'pglast.ast.CreateSchemaStmt'>: <function create_schema_stmt>, <class 'pglast.ast.CreateSeqStmt'>: <function create_seq_stmt>, <class 'pglast.ast.CreateStatsStmt'>: <function create_stats_stmt>, <class 'pglast.ast.CreateStmt'>: <function create_stmt>, <class 'pglast.ast.CreateSubscriptionStmt'>: <function create_subscription_stmt>, <class 'pglast.ast.CreateTableAsStmt'>: <function create_table_as_stmt>, <class 'pglast.ast.CreateTableSpaceStmt'>: <function create_table_space_stmt>, <class 'pglast.ast.CreateTransformStmt'>: <function create_transform_stmt>, <class 'pglast.ast.CreateTrigStmt'>: <function create_trig_stmt>, <class 'pglast.ast.CreateUserMappingStmt'>: <function create_user_mapping_stmt>, <class 'pglast.ast.CreatedbStmt'>: <function create_db_stmt>, <class 'pglast.ast.CurrentOfExpr'>: <function current_of_expr>, <class 'pglast.ast.DeallocateStmt'>: <function deallocate_stmt>, <class 'pglast.ast.DeclareCursorStmt'>: <function declare_cursor_stmt>, <class 'pglast.ast.DefElem'>: <function def_elem>, <class 'pglast.ast.DefineStmt'>: <function define_stmt>, <class 'pglast.ast.DeleteStmt'>: <function delete_stmt>, <class 'pglast.ast.DiscardStmt'>: <function discard_stmt>, <class 'pglast.ast.DoStmt'>: <function do_stmt>, <class 'pglast.ast.DropOwnedStmt'>: <function drop_owned_stmt>, <class 'pglast.ast.DropRoleStmt'>: <function drop_role_stmt>, <class 'pglast.ast.DropStmt'>: <function drop_stmt>, <class 'pglast.ast.DropSubscriptionStmt'>: <function drop_subscription_stmt>, <class 'pglast.ast.DropTableSpaceStmt'>: <function drop_table_space_stmt>, <class 'pglast.ast.DropUserMappingStmt'>: <function drop_user_mapping_stmt>, <class 'pglast.ast.DropdbStmt'>: <function drop_db_stmt>, <class 'pglast.ast.ExecuteStmt'>: <function execute_stmt>, <class 'pglast.ast.ExplainStmt'>: <function explain_stmt>, <class 'pglast.ast.FetchStmt'>: <function fetch_stmt>, <class 'pglast.ast.Float'>: <function float>, <class 'pglast.ast.FuncCall'>: <function func_call>, <class 'pglast.ast.FunctionParameter'>: <function function_parameter>, <class 'pglast.ast.GrantRoleStmt'>: <function grant_role_stmt>, <class 'pglast.ast.GrantStmt'>: <function grant_stmt>, <class 'pglast.ast.GroupingFunc'>: <function grouping_func>, <class 'pglast.ast.GroupingSet'>: <function grouping_set>, <class 'pglast.ast.ImportForeignSchemaStmt'>: <function import_foreign_schema_stmt>, <class 'pglast.ast.IndexElem'>: <function index_elem>, <class 'pglast.ast.IndexStmt'>: <function index_stmt>, <class 'pglast.ast.InferClause'>: <function infer_clause>, <class 'pglast.ast.InsertStmt'>: <function insert_stmt>, <class 'pglast.ast.Integer'>: <function integer>, <class 'pglast.ast.IntoClause'>: <function into_clause>, <class 'pglast.ast.JoinExpr'>: <function join_expr>, <class 'pglast.ast.JsonAggConstructor'>: <function json_agg_constructor>, <class 'pglast.ast.JsonArgument'>: <function json_argument>, <class 'pglast.ast.JsonArrayAgg'>: <function json_array_agg>, <class 'pglast.ast.JsonArrayConstructor'>: <function json_array_constructor>, <class 'pglast.ast.JsonArrayQueryConstructor'>: <function json_array_query_constructor>, <class 'pglast.ast.JsonBehavior'>: <function json_behavior>, <class 'pglast.ast.JsonFormat'>: <function json_format>, <class 'pglast.ast.JsonFuncExpr'>: <function json_func_expr>, <class 'pglast.ast.JsonIsPredicate'>: <function json_is_predicate>, <class 'pglast.ast.JsonKeyValue'>: <function json_key_value>, <class 'pglast.ast.JsonObjectAgg'>: <function json_object_agg>, <class 'pglast.ast.JsonObjectConstructor'>: <function json_object_constructor>, <class 'pglast.ast.JsonOutput'>: <function json_output>, <class 'pglast.ast.JsonParseExpr'>: <function json_parse_expr>, <class 'pglast.ast.JsonReturning'>: <function json_returning>, <class 'pglast.ast.JsonScalarExpr'>: <function json_scalar_expr>, <class 'pglast.ast.JsonSerializeExpr'>: <function json_serialize_expr>, <class 'pglast.ast.JsonTable'>: <function json_table>, <class 'pglast.ast.JsonTableColumn'>: <function json_table_column>, <class 'pglast.ast.JsonTablePathSpec'>: <function json_table_path_spec>, <class 'pglast.ast.JsonValueExpr'>: <function json_value_expr>, <class 'pglast.ast.ListenStmt'>: <function listen_stmt>, <class 'pglast.ast.LoadStmt'>: <function load_stmt>, <class 'pglast.ast.LockStmt'>: <function lock_stmt>, <class 'pglast.ast.LockingClause'>: <function locking_clause>, <class 'pglast.ast.MergeStmt'>: <function merge_stmt>, <class 'pglast.ast.MergeSupportFunc'>: <function merge_support_func>, <class 'pglast.ast.MergeWhenClause'>: <function merge_when_clause>, <class 'pglast.ast.MinMaxExpr'>: <function min_max_expr>, <class 'pglast.ast.MultiAssignRef'>: <function multi_assign_ref>, <class 'pglast.ast.NamedArgExpr'>: <function named_arg_expr>, <class 'pglast.ast.NotifyStmt'>: <function notify_stmt>, <class 'pglast.ast.NullTest'>: <function null_test>, <class 'pglast.ast.ObjectWithArgs'>: <function object_with_args>, <class 'pglast.ast.OnConflictClause'>: <function on_conflict_clause>, <class 'pglast.ast.ParamRef'>: <function param_ref>, <class 'pglast.ast.PartitionBoundSpec'>: <function partition_bound_spec>, <class 'pglast.ast.PartitionCmd'>: <function partition_cmd>, <class 'pglast.ast.PartitionElem'>: <function partition_elem>, <class 'pglast.ast.PartitionRangeDatum'>: <function partition_range_datum>, <class 'pglast.ast.PartitionSpec'>: <function partition_spec>, <class 'pglast.ast.PrepareStmt'>: <function prepare_stmt>, <class 'pglast.ast.PublicationObjSpec'>: <function publication_obj_spec>, <class 'pglast.ast.PublicationTable'>: <function publication_table>, <class 'pglast.ast.RangeFunction'>: <function range_function>, <class 'pglast.ast.RangeSubselect'>: <function range_subselect>, <class 'pglast.ast.RangeTableFunc'>: <function range_table_func>, <class 'pglast.ast.RangeTableFuncCol'>: <function range_table_func_col>, <class 'pglast.ast.RangeTableSample'>: <function range_table_sample>, <class 'pglast.ast.RangeVar'>: <function range_var>, <class 'pglast.ast.RawStmt'>: <function raw_stmt>, <class 'pglast.ast.ReassignOwnedStmt'>: <function reassign_owned_stmt>, <class 'pglast.ast.RefreshMatViewStmt'>: <function refresh_mat_view_stmt>, <class 'pglast.ast.ReindexStmt'>: <function reindex_stmt>, <class 'pglast.ast.RenameStmt'>: <function rename_stmt>, <class 'pglast.ast.ReplicaIdentityStmt'>: <function replica_identity_stmt>, <class 'pglast.ast.ResTarget'>: <function res_target>, <class 'pglast.ast.ReturnStmt'>: <function return_stmt>, <class 'pglast.ast.RoleSpec'>: <function role_spec>, <class 'pglast.ast.RowExpr'>: <function row_expr>, <class 'pglast.ast.RuleStmt'>: <function rule_stmt_printer>, <class 'pglast.ast.SQLValueFunction'>: <function sql_value_function>, <class 'pglast.ast.SecLabelStmt'>: <function sec_label_stmt>, <class 'pglast.ast.SelectStmt'>: <function select_stmt>, <class 'pglast.ast.SetToDefault'>: <function set_to_default>, <class 'pglast.ast.SortBy'>: <function sort_by>, <class 'pglast.ast.StatsElem'>: <function stats_elem>, <class 'pglast.ast.String'>: <function string>, <class 'pglast.ast.SubLink'>: <function sub_link>, <class 'pglast.ast.TableLikeClause'>: <function table_like_clause>, <class 'pglast.ast.TransactionStmt'>: <function transaction_stmt>, <class 'pglast.ast.TriggerTransition'>: <function trigger_transition>, <class 'pglast.ast.TruncateStmt'>: <function truncate_stmt>, <class 'pglast.ast.TypeCast'>: <function type_cast>, <class 'pglast.ast.TypeName'>: <function type_name>, <class 'pglast.ast.UnlistenStmt'>: <function unlisten_stmt>, <class 'pglast.ast.UpdateStmt'>: <function update_stmt>, <class 'pglast.ast.VacuumRelation'>: <function vacuum_relation>, <class 'pglast.ast.VacuumStmt'>: <function vacuum_stmt>, <class 'pglast.ast.VariableSetStmt'>: <function variable_set_stmt>, <class 'pglast.ast.VariableShowStmt'>: <function variable_show_statement>, <class 'pglast.ast.ViewStmt'>: <function view_stmt>, <class 'pglast.ast.WindowDef'>: <function window_def>, <class 'pglast.ast.WithClause'>: <function with_clause>, <class 'pglast.ast.XmlExpr'>: <function xml_expr>, <class 'pglast.ast.XmlSerialize'>: <function xml_serialize>}

  Registry of specialized node printers, keyed by their class.

pglast.printers.SPECIAL_FUNCTIONS = {'pg_catalog.btrim': <function btrim>, 'pg_catalog.extract': <function extract>, 'pg_catalog.ltrim': <function ltrim>, 'pg_catalog.normalize': <function normalize>, 'pg_catalog.overlaps': <function overlaps>, 'pg_catalog.overlay': <function overlay>, 'pg_catalog.pg_collation_for': <function pg_collation_for>, 'pg_catalog.position': <function position>, 'pg_catalog.rtrim': <function rtrim>, 'pg_catalog.substring': <function substring>, 'pg_catalog.timezone': <function timezone>, 'pg_catalog.xmlexists': <function xmlexists>}

  Registry of specialized function printers, keyed by their qualified name.

exception pglast.printers.PrinterAlreadyPresentError

  Exception raised trying to register another function for a tag already present.

pglast.printers.get_printer_for_node(node)

  Get specific printer implementation for given node.

  If there is a more specific printer for it, when it’s inside a particular ancestor, return that instead.

pglast.printers.node_printer(*nodes, override=False)

  Decorator to register a specific printer implementation for a (set of) nodes.

  Parameters:

    - *nodes – a list of one or two items

    - override (bool) – when `True` the function will be registered even if already present in the `NODE_PRINTERS` registry

  When nodes contains a single item then the decorated function is the generic one, and it will be registered in `NODE_PRINTERS` with that key alone. Otherwise it must contain two elements: the first may be either a scalar value or a sequence of parent nodes, and the function will be registered under the key `(parent, node)`.

pglast.printers.special_function(name, override=False)

  Decorator to declare a particular PostgreSQL function name as special, with a specific printer.

  Parameters:

    - name (str) – the qualified name of the PG function

    - override (bool) – when `True` the function will be registered even if already present in the `SPECIAL_FUNCTIONS` registry

Printer functions

- `pglast.printers.ddl` — DDL printer functions
  - `access_priv()`
  - `alter_collation_stmt()`
  - `alter_database_stmt()`
  - `alter_database_set_stmt()`
  - `alter_extension_stmt()`
  - `alter_extension_stmt_def_elem()`
  - `alter_extension_contents_stmt()`
  - `alter_enum_stmt()`
  - `alter_default_privileges_stmt()`
  - `alter_function_stmt()`
  - `alter_object_schema_stmt()`
  - `alter_operator_stmt()`
  - `alter_operator_stmt_def_elem()`
  - `alter_op_family_stmt()`
  - `alter_owner_stmt()`
  - `alter_policy_stmt()`
  - `alter_role_stmt()`
  - `alter_seq_stmt()`
  - `alter_tablespace_options_stmt()`
  - `alter_table_stmt()`
  - `range_var()`
  - `alter_table_cmd()`
  - `alter_table_cmd_def_elem()`
  - `alter_table_move_all_stmt()`
  - `alter_ts_configuration_stmt()`
  - `alter_ts_dictionary_stmt()`
  - `alter_stats_stmt()`
  - `alter_subscription_stmt()`
  - `alter_publication_stmt()`
  - `alter_fdw_stmt()`
  - `alter_fdw_stmt_def_elem()`
  - `alter_foreign_server_stmt()`
  - `alter_user_mapping_stmt()`
  - `alter_role_set_stmt()`
  - `alter_domain_stmt()`
  - `alter_event_trig_stmt()`
  - `alter_type_stmt()`
  - `check_point_stmt()`
  - `cluster_stmt()`
  - `column_def()`
  - `comment_stmt()`
  - `composite_type_stmt()`
  - `composite_type_stmt_range_var()`
  - `constraint()`
  - `create_am_stmt()`
  - `create_db_stmt()`
  - `create_db_stmt_def_elem()`
  - `create_cast_stmt()`
  - `create_conversion_stmt()`
  - `create_domain_stmt()`
  - `create_enum_stmt()`
  - `create_event_trig_stmt()`
  - `create_event_trig_stmt_def_elem()`
  - `create_extension_stmt()`
  - `create_extension_stmt_def_elem()`
  - `create_fdw_stmt()`
  - `create_fdw_stmt_def_elem()`
  - `create_foreign_server_stmt()`
  - `create_foreign_table_stmt()`
  - `create_foreign_table_stmt_def_elem()`
  - `create_function_stmt()`
  - `create_function_option()`
  - `create_opclass_stmt()`
  - `create_opclass_item()`
  - `create_op_family_stmt()`
  - `create_plang_stmt()`
  - `create_policy_stmt()`
  - `create_publication_stmt()`
  - `create_range_stmt()`
  - `create_role_stmt()`
  - `create_or_alter_role_option()`
  - `create_schema_stmt()`
  - `create_seq_stmt()`
  - `create_seq_stmt_def_elem()`
  - `create_stats_stmt()`
  - `create_stmt()`
  - `create_table_as_stmt()`
  - `create_table_space_stmt()`
  - `create_trig_stmt()`
  - `create_subscription_stmt_stmt_def_elem()`
  - `create_subscription_stmt()`
  - `current_of_expr()`
  - `create_transform_stmt()`
  - `close_portal_stmt()`
  - `create_user_mapping_stmt()`
  - `deallocate_stmt()`
  - `define_stmt()`
  - `def_elem()`
  - `define_stmt_def_elem()`
  - `discard_stmt()`
  - `do_stmt()`
  - `drop_db_stmt()`
  - `drop_owned_stmt()`
  - `drop_role_stmt()`
  - `drop_stmt()`
  - `drop_subscription_stmt()`
  - `drop_table_space_stmt()`
  - `drop_user_mapping_stmt()`
  - `function_parameter()`
  - `grant_stmt()`
  - `grant_role_stmt()`
  - `grant_role_stmt_opt()`
  - `import_foreign_schema_stmt()`
  - `index_stmt()`
  - `load_stmt()`
  - `lock_stmt()`
  - `notify_stmt()`
  - `object_with_args()`
  - `alter_object_schema_stmt_object_with_args()`
  - `alter_operator_stmt_object_with_args()`
  - `alter_owner_stmt_object_with_args()`
  - `comment_stmt_object_with_args()`
  - `drop_stmt_object_with_args()`
  - `partition_bound_spec()`
  - `partition_cmd()`
  - `partition_elem()`
  - `partition_range_datum()`
  - `partition_spec()`
  - `publication_obj_spec()`
  - `publication_table()`
  - `reindex_stmt()`
  - `reindex_stmt_def_elem()`
  - `rename_stmt()`
  - `rename_stmt_range_var()`
  - `replica_identity_stmt()`
  - `role_spec()`
  - `rule_stmt_printer()`
  - `refresh_mat_view_stmt()`
  - `reassign_owned_stmt()`
  - `return_stmt()`
  - `sec_label_stmt()`
  - `stats_elem()`
  - `table_like_clause()`
  - `trigger_transition()`
  - `vacuum_stmt()`
  - `vacuum_stmt_def_elem()`
  - `vacuum_relation()`
  - `variable_set_stmt()`
  - `variable_show_statement()`
  - `view_stmt()`
  - `view_stmt_def_elem()`
- `pglast.printers.dml` — DML printer functions
  - `a_array_expr()`
  - `a_const()`
  - `a_expr()`
  - `a_indices()`
  - `a_indirection()`
  - `a_indirection_a_star()`
  - `a_indirection_column_ref()`
  - `a_indirection_func_call()`
  - `a_indirection_field()`
  - `a_star()`
  - `alias()`
  - `bitstring()`
  - `boolean()`
  - `bool_expr()`
  - `boolean_test()`
  - `call_stmt()`
  - `case_expr()`
  - `case_when()`
  - `coalesce_expr()`
  - `collate_clause()`
  - `column_ref()`
  - `cte_cycle_clause()`
  - `cte_cycle_clause_type_cast()`
  - `cte_search_clause()`
  - `common_table_expr()`
  - `constraints_set_stmt()`
  - `copy_stmt()`
  - `copy_stmt_def_elem()`
  - `declare_cursor_stmt()`
  - `delete_stmt()`
  - `execute_stmt()`
  - `explain_stmt()`
  - `explain_stmt_def_elem()`
  - `fetch_stmt()`
  - `float()`
  - `func_call()`
  - `func_call_window_def()`
  - `grouping_set()`
  - `grouping_func()`
  - `index_elem()`
  - `infer_clause()`
  - `integer()`
  - `insert_stmt()`
  - `into_clause()`
  - `join_expr()`
  - `json_agg_constructor()`
  - `json_argument()`
  - `json_array_agg()`
  - `json_array_constructor()`
  - `json_array_query_constructor()`
  - `json_behavior()`
  - `json_format()`
  - `json_func_expr()`
  - `json_is_predicate()`
  - `json_key_value()`
  - `json_object_agg()`
  - `json_object_constructor()`
  - `json_output()`
  - `json_parse_expr()`
  - `json_returning()`
  - `json_scalar_expr()`
  - `json_serialize_expr()`
  - `json_table()`
  - `json_table_column()`
  - `json_table_path_spec()`
  - `json_value_expr()`
  - `locking_clause()`
  - `listen_stmt()`
  - `merge_stmt()`
  - `merge_support_func()`
  - `merge_when_clause()`
  - `min_max_expr()`
  - `multi_assign_ref()`
  - `named_arg_expr()`
  - `null_test()`
  - `param_ref()`
  - `prepare_stmt()`
  - `on_conflict_clause()`
  - `range_function()`
  - `range_subselect()`
  - `range_table_func()`
  - `range_table_func_res_target()`
  - `range_table_func_col()`
  - `range_var()`
  - `range_table_sample()`
  - `raw_stmt()`
  - `res_target()`
  - `row_expr()`
  - `select_stmt()`
  - `set_to_default()`
  - `sort_by()`
  - `sql_value_function()`
  - `string()`
  - `sub_link()`
  - `transaction_stmt()`
  - `transaction_stmt_def_elem()`
  - `truncate_stmt()`
  - `type_cast()`
  - `type_name()`
  - `variable_set_stmt_type_cast()`
  - `update_stmt()`
  - `unlisten_stmt()`
  - `with_clause()`
  - `window_def()`
  - `update_stmt_res_target()`
  - `xml_expr()`
  - `xml_serialize()`