添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • Define an External Table with Single Row Error Isolation
  • Capture Row Formatting Errors and Declare a Reject Limit
  • Identifying Invalid CSV Files in Error Table Data
  • Moving Data between Tables
  • Registering Files into HAWQ Internal Tables
  • Loading Data with hawq load
  • Loading Data with COPY
  • Running COPY in Single Row Error Isolation Mode
  • Optimizing Data Load and Query Performance
  • Unloading Data from HAWQ
  • Defining a File-Based Writable External Table
  • Example - HAWQ file server (gpfdist)
  • Defining a Command-Based Writable External Web Table
  • Disabling EXECUTE for Web or Writable External Tables
  • Unloading Data Using a Writable External Table
  • Unloading Data Using COPY
  • Transforming XML Data
  • Determine the Transformation Schema
  • Write a Transform
  • Write the gpfdist Configuration
  • Load the Data
  • Transfer and Store the Data
  • Transforming with GPLOAD
  • Transforming with INSERT INTO SELECT FROM
  • Configuration File Format
  • XML Transformation Examples
  • Command-based Web External Tables
  • Example using IRS MeF XML Files (In demo Directory)
  • Example using WITSML™ Files (In demo Directory)
  • Accessing External SQL Databases
  • Writing Data to HDFS
  • Using Profiles to Read and Write Data
  • PXF External Tables and API
  • Troubleshooting PXF
  • Querying Data
  • About HAWQ Query Processing
  • About GPORCA
  • Overview of GPORCA
  • GPORCA Features and Enhancements
  • Enabling GPORCA
  • Considerations when Using GPORCA
  • Determining The Query Optimizer In Use
  • Changed Behavior with GPORCA
  • GPORCA Limitations
  • Defining Queries
  • Using Functions and Operators
  • Query Performance
  • Query Profiling
  • Best Practices
  • Configuring HAWQ
  • Operating HAWQ
  • Securing HAWQ
  • Managing Resources
  • Managing Data
  • Querying Data
  • Troubleshooting
  • Query Performance Issues
  • Rejection of Query Resource Requests
  • Queries Cancelled Due to High VMEM Usage
  • Segments Do Not Appear in gp_segment_configuration
  • Handling Segment Resource Fragmentation
  • HAWQ Reference
  • SQL Commands
  • ABORT
  • ALTER AGGREGATE
  • ALTER CONVERSION
  • ALTER DATABASE
  • ALTER FUNCTION
  • ALTER OPERATOR
  • ALTER OPERATOR CLASS
  • ALTER RESOURCE QUEUE
  • ALTER ROLE
  • ALTER SEQUENCE
  • ALTER TABLE
  • ALTER TABLESPACE
  • ALTER TYPE
  • ALTER USER
  • ANALYZE
  • BEGIN
  • CHECKPOINT
  • CLOSE
  • COMMIT
  • CREATE AGGREGATE
  • CREATE CAST
  • CREATE CONVERSION
  • CREATE DATABASE
  • CREATE EXTERNAL TABLE
  • CREATE FUNCTION
  • CREATE GROUP
  • CREATE LANGUAGE
  • CREATE OPERATOR
  • CREATE OPERATOR CLASS
  • CREATE RESOURCE QUEUE
  • CREATE ROLE
  • CREATE SCHEMA
  • CREATE SEQUENCE
  • CREATE TABLE
  • CREATE TABLE AS
  • CREATE TABLESPACE
  • CREATE TYPE
  • CREATE USER
  • CREATE VIEW
  • DEALLOCATE
  • DECLARE
  • DROP AGGREGATE
  • DROP CAST
  • DROP CONVERSION
  • DROP DATABASE
  • DROP EXTERNAL TABLE
  • DROP FILESPACE
  • DROP FUNCTION
  • DROP GROUP
  • DROP LANGUAGE
  • DROP OPERATOR
  • DROP OPERATOR CLASS
  • DROP OWNED
  • DROP RESOURCE QUEUE
  • DROP ROLE
  • DROP SCHEMA
  • DROP SEQUENCE
  • DROP TABLE
  • DROP TABLESPACE
  • DROP TYPE
  • DROP USER
  • DROP VIEW
  • EXECUTE
  • EXPLAIN
  • FETCH
  • GRANT
  • INSERT
  • PREPARE
  • REASSIGN OWNED
  • RELEASE SAVEPOINT
  • RESET
  • REVOKE
  • ROLLBACK
  • ROLLBACK TO SAVEPOINT
  • SAVEPOINT
  • SELECT
  • SELECT INTO
  • SET ROLE
  • SET SESSION AUTHORIZATION
  • TRUNCATE
  • VACUUM
  • Server Configuration Parameter Reference
  • About Server Configuration Parameters
  • Configuration Parameter Categories
  • Append-Only Table Parameters
  • Client Connection Default Parameters
  • Connection and Authentication Parameters
  • Database and Tablespace/Filespace Parameters
  • Error Reporting and Logging Parameters
  • External Table Parameters
  • GPORCA Parameters
  • HAWQ Array Configuration Parameters
  • HAWQ Extension Framework (PXF) Parameters
  • HAWQ PL/Java Extension Parameters
  • HAWQ Resource Management Parameters
  • Lock Management Parameters
  • Past PostgreSQL Version Compatibility Parameters
  • Query Tuning Parameters
  • Ranger Configuration Parameters
  • Statistics Collection Parameters
  • System Resource Consumption Parameters
  • Configuration Parameters
  • add_missing_from
  • application_name
  • array_nulls
  • authentication_timeout
  • backslash_quote
  • block_size
  • bonjour_name
  • check_function_bodies
  • client_encoding
  • client_min_messages
  • cpu_index_tuple_cost
  • cpu_operator_cost
  • cpu_tuple_cost
  • cursor_tuple_fraction
  • custom_variable_classes
  • DateStyle
  • db_user_namespace
  • deadlock_timeout
  • debug_assertions
  • debug_pretty_print
  • debug_print_parse
  • debug_print_plan
  • debug_print_prelim_plan
  • debug_print_rewritten
  • debug_print_slice_table
  • default_hash_table_bucket_number
  • default_statistics_target
  • default_tablespace
  • default_transaction_isolation
  • default_transaction_read_only
  • dynamic_library_path
  • effective_cache_size
  • enable_bitmapscan
  • enable_groupagg
  • enable_hashagg
  • enable_hashjoin
  • enable_indexscan
  • enable_mergejoin
  • enable_nestloop
  • enable_seqscan
  • enable_sort
  • enable_tidscan
  • escape_string_warning
  • explain_pretty_print
  • extra_float_digits
  • from_collapse_limit
  • gp_adjust_selectivity_for_outerjoins
  • gp_analyze_relative_error
  • gp_autostats_mode
  • gp_autostats_on_change_threshhold
  • gp_backup_directIO
  • gp_backup_directIO_read_chunk_mb
  • gp_cached_segworkers_threshold
  • gp_command_count
  • gp_connections_per_thread
  • gp_debug_linger
  • gp_dynamic_partition_pruning
  • gp_enable_agg_distinct
  • gp_enable_agg_distinct_pruning
  • gp_enable_direct_dispatch
  • gp_enable_fallback_plan
  • gp_enable_fast_sri
  • gp_enable_groupext_distinct_gather
  • gp_enable_groupext_distinct_pruning
  • gp_enable_multiphase_agg
  • gp_enable_predicate_propagation
  • gp_enable_preunique
  • gp_enable_sequential_window_plans
  • gp_enable_sort_distinct
  • gp_enable_sort_limit
  • gp_external_enable_exec
  • gp_external_grant_privileges
  • gp_external_max_segs
  • gp_filerep_tcp_keepalives_count
  • gp_filerep_tcp_keepalives_idle
  • gp_filerep_tcp_keepalives_interval
  • gp_hashjoin_tuples_per_bucket
  • gp_idf_deduplicate
  • gp_interconnect_cache_future_packets
  • gp_interconnect_default_rtt
  • gp_interconnect_fc_method
  • gp_interconnect_hash_multiplier
  • gp_interconnect_min_retries_before_timeout
  • gp_interconnect_min_rto
  • gp_interconnect_queue_depth
  • gp_interconnect_setup_timeout
  • gp_interconnect_snd_queue_depth
  • gp_interconnect_timer_checking_period
  • gp_interconnect_timer_period
  • gp_interconnect_type
  • gp_log_format
  • gp_max_csv_line_length
  • gp_max_databases
  • gp_max_filespaces
  • gp_max_packet_size
  • gp_max_plan_size
  • gp_max_tablespaces
  • gp_motion_cost_per_row
  • gp_reject_percent_threshold
  • gp_reraise_signal
  • gp_role
  • gp_safefswritesize
  • gp_segment_connect_timeout
  • gp_segments_for_planner
  • gp_session_id
  • gp_set_proc_affinity
  • gp_set_read_only
  • gp_statistics_pullup_from_child_partition
  • gp_statistics_use_fkeys
  • gp_vmem_idle_resource_timeout
  • gp_vmem_protect_segworker_cache_limit
  • gp_workfile_checksumming
  • gp_workfile_compress_algorithm
  • gp_workfile_limit_files_per_query
  • gp_workfile_limit_per_query
  • gp_workfile_limit_per_segment
  • hawq_acl_type
  • hawq_dfs_url
  • hawq_global_rm_type
  • hawq_master_address_host
  • hawq_master_address_port
  • hawq_master_directory
  • hawq_master_temp_directory
  • hawq_re_memory_overcommit_max
  • hawq_rm_cluster_report_period
  • hawq_rm_force_alterqueue_cancel_queued_request
  • hawq_rm_master_port
  • hawq_rm_memory_limit_perseg
  • hawq_rm_min_resource_perseg
  • hawq_rm_nresqueue_limit
  • hawq_rm_nslice_perseg_limit
  • hawq_rm_nvcore_limit_perseg
  • hawq_rm_nvseg_perquery_limit
  • hawq_rm_nvseg_perquery_perseg_limit
  • hawq_rm_nvseg_variance_amon_seg_limit
  • hawq_rm_rejectrequest_nseg_limit
  • hawq_rm_resource_idle_timeout
  • hawq_rm_return_percent_on_overcommit
  • hawq_rm_segment_heartbeat_interval
  • hawq_rm_segment_port
  • hawq_rm_stmt_nvseg
  • hawq_rm_stmt_vseg_memory
  • hawq_rm_tolerate_nseg_limit
  • hawq_rm_yarn_address
  • hawq_rm_yarn_app_name
  • hawq_rm_yarn_queue_name
  • hawq_rm_yarn_scheduler_address
  • hawq_rps_address_port
  • hawq_rps_check_local_interval
  • hawq_segment_address_port
  • hawq_segment_directory
  • hawq_segment_temp_directory
  • integer_datetimes
  • IntervalStyle
  • join_collapse_limit
  • krb_caseins_users
  • krb_server_keyfile
  • krb_srvname
  • lc_collate
  • lc_ctype
  • lc_messages
  • lc_monetary
  • lc_numeric
  • lc_time
  • listen_addresses
  • local_preload_libraries
  • log_autostats
  • log_connections
  • log_disconnections
  • log_dispatch_stats
  • log_duration
  • log_error_verbosity
  • log_executor_stats
  • log_hostname
  • log_min_duration_statement
  • log_min_error_statement
  • log_min_messages
  • log_parser_stats
  • log_planner_stats
  • log_rotation_age
  • log_rotation_size
  • log_statement
  • log_statement_stats
  • log_timezone
  • log_truncate_on_rotation
  • max_appendonly_tables
  • max_connections
  • max_files_per_process
  • max_fsm_pages
  • max_fsm_relations
  • max_function_args
  • max_identifier_length
  • max_index_keys
  • max_locks_per_transaction
  • max_prepared_transactions
  • max_stack_depth
  • optimizer
  • optimizer_analyze_root_partition
  • optimizer_minidump
  • optimizer_parts_to_force_sort_on_insert
  • optimizer_prefer_scalar_dqa_multistage_agg
  • password_encryption
  • pgstat_track_activity_query_size
  • pljava_classpath
  • pljava_statement_cache_size
  • pljava_release_lingering_savepoints
  • pljava_vmoptions
  • pxf_enable_filter_pushdown
  • pxf_enable_stat_collection
  • pxf_remote_service_login
  • pxf_remote_service_secret
  • pxf_service_address
  • pxf_service_port
  • pxf_stat_max_fragments
  • random_page_cost
  • regex_flavor
  • runaway_detector_activation_percent
  • search_path
  • seg_max_connections
  • seq_page_cost
  • server_encoding
  • server_ticket_renew_interval
  • server_version
  • server_version_num
  • shared_buffers
  • shared_preload_libraries
  • ssl_ciphers
  • standard_conforming_strings
  • statement_timeout
  • superuser_reserved_connections
  • tcp_keepalives_count
  • tcp_keepalives_idle
  • tcp_keepalives_interval
  • temp_buffers
  • TimeZone
  • timezone_abbreviations
  • track_activities
  • track_counts
  • transaction_isolation
  • transaction_read_only
  • transform_null_equals
  • unix_socket_directory
  • unix_socket_group
  • unix_socket_permissions
  • update_process_title
  • vacuum_cost_delay
  • vacuum_cost_limit
  • vacuum_cost_page_dirty
  • vacuum_cost_page_miss
  • vacuum_freeze_min_age
  • xid_stop_limit
  • Sample hawq-site.xml Configuration File
  • HDFS Configuration Reference
  • Environment Variables
  • Character Set Support Reference
  • Data Types
  • System Catalog Reference
  • System Tables
  • System Views
  • System Catalogs Definitions
  • gp_configuration_history
  • gp_distribution_policy
  • gp_global_sequence
  • gp_master_mirroring
  • gp_persistent_database_node
  • gp_persistent_filespace_node
  • gp_persistent_relation_node
  • gp_persistent_relfile_node
  • gp_persistent_tablespace_node
  • gp_relfile_node
  • gp_segment_configuration
  • gp_version_at_initdb
  • pg_aggregate
  • pg_am
  • pg_amop
  • pg_amproc
  • pg_appendonly
  • pg_attrdef
  • pg_attribute
  • pg_attribute_encoding
  • pg_auth_members
  • pg_authid
  • pg_cast
  • pg_class
  • pg_compression
  • pg_constraint
  • pg_conversion
  • pg_database
  • pg_depend
  • pg_description
  • pg_exttable
  • pg_filespace
  • pg_filespace_entry
  • pg_index
  • pg_inherits
  • pg_language
  • pg_largeobject
  • pg_listener
  • pg_locks
  • pg_namespace
  • pg_opclass
  • pg_operator
  • pg_partition
  • pg_partition_columns
  • pg_partition_encoding
  • pg_partition_rule
  • pg_partition_templates
  • pg_partitions
  • pg_pltemplate
  • pg_proc
  • pg_resqueue
  • pg_resqueue_status
  • pg_rewrite
  • pg_roles
  • pg_shdepend
  • pg_shdescription
  • pg_stat_activity
  • pg_stat_last_operation
  • pg_stat_last_shoperation
  • pg_stat_operations
  • pg_stat_partition_operations
  • pg_statistic
  • pg_stats
  • pg_tablespace
  • pg_trigger
  • pg_type
  • pg_type_encoding
  • pg_window
  • Checking for Tables that Need Routine Maintenance
  • Viewing HAWQ Server Log Files
  • Checking Database Object Sizes and Disk Space
  • HAWQ Management Tools Reference
  • analyzedb
  • createdb
  • createuser
  • dropdb
  • dropuser
  • gpfdist
  • gplogfilter
  • hawq activate
  • hawq check
  • hawq checkperf
  • hawq config
  • hawq extract
  • hawq filespace
  • hawq init
  • hawq load
  • hawq register
  • hawq restart
  • hawq scp
  • hawq ssh
  • hawq ssh-exkeys
  • hawq start
  • hawq state
  • hawq stop
  • pg_dump
  • pg_dumpall
  • pg_restore
  • vacuumdb
  • Checking System State
  • Checking Disk Space Usage
  • Viewing Metadata Information about Database Objects
  • Viewing Query Workfile Usage Information
  • HAWQ Error Codes

    You can monitor a HAWQ system using a variety of tools included with the system or available as add-ons.

    Observing the HAWQ system day-to-day performance helps administrators understand the system behavior, plan workflow, and troubleshoot problems. This chapter discusses tools for monitoring database performance and activity.

    Also, be sure to review Recommended Monitoring and Maintenance Tasks for monitoring activities you can script to quickly detect problems in the system.

    Using hawq_toolkit

    Use HAWQ’s administrative schema hawq_toolkit to query the system catalogs, log files, and operating environment for system status information. The hawq_toolkit schema contains several views you can access using SQL commands. The hawq_toolkit schema is accessible to all database users. Some objects require superuser permissions. Use a command similar to the following to add the hawq_toolkit schema to your schema search path:

    => SET ROLE 'gpadmin' ;
    =# SET search_path TO myschema, hawq_toolkit ;
    

    Monitoring System State

    As a HAWQ administrator, you must monitor the system for problem events such as a segment going down or running out of disk space on a segment host. The following topics describe how to monitor the health of a HAWQ system and examine certain state information for a HAWQ system.

  • Checking System State
  • Checking Disk Space Usage
  • Viewing Metadata Information about Database Objects
  • Viewing Query Workfile Usage Information
  • Checking System State

    A HAWQ system is comprised of multiple PostgreSQL instances (the master and segments) spanning multiple machines. To monitor a HAWQ system, you need to know information about the system as a whole, as well as status information of the individual instances. The hawq state utility provides status information about a HAWQ system.

    Viewing Master and Segment Status and Configuration

    The default hawq state action is to check segment instances and show a brief status of the valid and failed segments. For example, to see a quick status of your HAWQ system:

    $ hawq state -b
    

    You can also display information about the HAWQ master data directory by invoking hawq state with the -d option:

    $ hawq state -d <master_data_dir>
    

    Checking Disk Space Usage

    Checking Sizing of Distributed Databases and Tables

    The hawq_toolkit administrative schema contains several views that you can use to determine the disk space usage for a distributed HAWQ database, schema, table, or index.

    Viewing Disk Space Usage for a Database

    To see the total size of a database (in bytes), use the hawq_size_of_database view in the hawq_toolkit administrative schema. For example:

    => SELECT * FROM hawq_toolkit.hawq_size_of_database
         ORDER BY sodddatname;
    
    Viewing Disk Space Usage for a Table

    The hawq_toolkit administrative schema contains several views for checking the size of a table. The table sizing views list the table by object ID (not by name). To check the size of a table by name, you must look up the relation name (relname) in the pg_class table. For example:

    => SELECT relname AS name, sotdsize AS size, sotdtoastsize
         AS toast, sotdadditionalsize AS other
         FROM hawq_toolkit.hawq_size_of_table_disk AS sotd, pg_class
       WHERE sotd.sotdoid=pg_class.oid ORDER BY relname;
    
    Viewing Disk Space Usage for Indexes

    The hawq_toolkit administrative schema contains a number of views for checking index sizes. To see the total size of all index(es) on a table, use the hawq_size_of_all_table_indexes view. To see the size of a particular index, use the hawq_size_of_index view. The index sizing views list tables and indexes by object ID (not by name). To check the size of an index by name, you must look up the relation name (relname) in the pg_class table. For example:

    => SELECT soisize, relname AS indexname
         FROM pg_class, hawq_size_of_index
       WHERE pg_class.oid=hawq_size_of_index.soioid
         AND pg_class.relkind='i';
    

    Viewing Metadata Information about Database Objects

    HAWQ uses its system catalogs to track various metadata information about the objects stored in a database (tables, views, indexes and so on), as well as global objects including roles and tablespaces.

    Viewing the Last Operation Performed

    You can use the system views pg_stat_operations and pg_stat_partition_operations to look up actions performed on a database object. For example, to view when the cust table was created and when it was last analyzed:

    => SELECT schemaname AS schema, objname AS table,
         usename AS role, actionname AS action,
         subtype AS type, statime AS time
       FROM pg_stat_operations
       WHERE objname='cust';
    
     schema | table | role | action  | type  | time
    --------+-------+------+---------+-------+--------------------------
      sales | cust  | main | CREATE  | TABLE | 2010-02-09 18:10:07.867977-08
      sales | cust  | main | VACUUM  |       | 2010-02-10 13:32:39.068219-08
      sales | cust  | main | ANALYZE |       | 2010-02-25 16:07:01.157168-08
    (3 rows)
    

    Viewing the Definition of an Object

    You can use the psql \d meta-command to display the definition of an object, such as a table or view. For example, to see the definition of a table named sales:

    => \d sales
    
    Append-Only Table "public.sales"
     Column |  Type   | Modifiers 
    --------+---------+-----------
     id     | integer | 
     year   | integer | 
     qtr    | integer | 
     day    | integer | 
     region | text    | 
    Compression Type: None
    Compression Level: 0
    Block Size: 32768
    Checksum: f
    Distributed by: (id)
    

    Viewing Query Workfile Usage Information

    The HAWQ administrative schema hawq_toolkit contains views that display information about HAWQ workfiles. HAWQ creates workfiles on disk if it does not have sufficient memory to execute the query in memory. This information can be used for troubleshooting and tuning queries. The information in the views can also be used to specify the values for the HAWQ configuration parameters hawq_workfile_limit_per_query and hawq_workfile_limit_per_segment.

    Views in the hawq_toolkit schema include:

  • hawq_workfile_entries - one row for each operator currently using disk space for workfiles on a segment
  • hawq_workfile_usage_per_query - one row for each running query currently using disk space for workfiles on a segment
  • hawq_workfile_usage_per_segment - one row for each segment where each row displays the total amount of disk space currently in use for workfiles on the segment
  • HAWQ Error Codes

    The following section describes SQL error codes for certain database events.

    SQL Standard Error Codes

    The following table lists all the defined error codes. Some are not used, but are defined by the SQL standard. The error classes are also shown. For each error class there is a standard error code having the last three characters 000. This code is used only for error conditions that fall within the class but do not have any more-specific code assigned.

    The PL/pgSQL condition name for each error code is the same as the phrase shown in the table, with underscores substituted for spaces. For example, code 22012, DIVISION BY ZERO, has condition name DIVISION_BY_ZERO. Condition names can be written in either upper or lower case.

    Note: PL/pgSQL does not recognize warning, as opposed to error, condition names; those are classes 00, 01, and 02.

    Error Code Meaning Constant Class 00— Successful Completion 02001 NO ADDITIONAL DYNAMIC RESULT SETS RETURNED no_additional_dynamic_result_sets_returned Class 03 — SQL Statement Not Yet Complete 08001 SQLCLIENT UNABLE TO ESTABLISH SQLCONNECTION sqlclient_unable_to_establish_sqlconnection 08004 SQLSERVER REJECTED ESTABLISHMENT OF SQLCONNECTION sqlserver_rejected_establishment_of_sqlconnection 08007 TRANSACTION RESOLUTION UNKNOWN transaction_resolution_unknown 08P01 PROTOCOL VIOLATION protocol_violation Class 09 — Triggered Action Exception 2201G INVALID ARGUMENT FOR WIDTH BUCKET FUNCTION invalid_argument_for_width_bucket_function 22018 INVALID CHARACTER VALUE FOR CAST invalid_character_value_for_cast 22007 INVALID DATETIME FORMAT invalid_datetime_format 22019 INVALID ESCAPE CHARACTER invalid_escape_character 2200D INVALID ESCAPE OCTET invalid_escape_octet 22025 INVALID ESCAPE SEQUENCE invalid_escape_sequence 22P06 NONSTANDARD USE OF ESCAPE CHARACTER nonstandard_use_of_escape_character 22010 INVALID INDICATOR PARAMETER VALUE invalid_indicator_parameter_value 22020 INVALID LIMIT VALUE invalid_limit_value 22023 INVALID PARAMETER VALUE invalid_parameter_value 2201B INVALID REGULAR EXPRESSION invalid_regular_expression 22009 INVALID TIME ZONE DISPLACEMENT VALUE invalid_time_zone_displacement_value 2200C INVALID USE OF ESCAPE CHARACTER invalid_use_of_escape_character 2200G MOST SPECIFIC TYPE MISMATCH most_specific_type_mismatch 22004 NULL VALUE NOT ALLOWED null_value_not_allowed 22002 NULL VALUE NO INDICATOR PARAMETER null_value_no_indicator_parameter 22003 NUMERIC VALUE OUT OF RANGE numeric_value_out_of_range 22026 STRING DATA LENGTH MISMATCH string_data_length_mismatch 22001 STRING DATA RIGHT TRUNCATION string_data_right_truncation 22011 SUBSTRING ERROR substring_error 22027 TRIM ERROR trim_error 22024 UNTERMINATED C STRING unterminated_c_string 2200F ZERO LENGTH CHARACTER STRING zero_length_character_string 22P01 FLOATING POINT EXCEPTION floating_point_exception 22P02 INVALID TEXT REPRESENTATION invalid_text_representation 22P03 INVALID BINARY REPRESENTATION invalid_binary_representation 22P04 BAD COPY FILE FORMAT bad_copy_file_format 22P05 UNTRANSLATABLE CHARACTER untranslatable_character Class 23 — Integrity Constraint Violation 25003 INAPPROPRIATE ACCESS MODE FOR BRANCH TRANSACTION inappropriate_access_mode_for_branch_transaction 25004 INAPPROPRIATE ISOLATION LEVEL FOR BRANCH TRANSACTION inappropriate_isolation_level_for_branch_transaction 25005 NO ACTIVE SQL TRANSACTION FOR BRANCH TRANSACTION no_active_sql_transaction_for_branch_transaction 25006 READ ONLY SQL TRANSACTION read_only_sql_transaction 25007 SCHEMA AND DATA STATEMENT MIXING NOT SUPPORTED schema_and_data_statement_mixing_not_supported 25P01 NO ACTIVE SQL TRANSACTION no_active_sql_transaction 25P02 IN FAILED SQL TRANSACTION in_failed_sql_transaction Class 26 — Invalid SQL Statement Name 2B000 DEPENDENT PRIVILEGE DESCRIPTORS STILL EXIST dependent_privilege_descriptors_still_exist 2BP01 DEPENDENT OBJECTS STILL EXIST dependent_objects_still_exist Class 2D — Invalid Transaction Termination 40002 TRANSACTION INTEGRITY CONSTRAINT VIOLATION transaction_integrity_constraint_violation 40001 SERIALIZATION FAILURE serialization_failure 40003 STATEMENT COMPLETION UNKNOWN statement_completion_unknown 40P01 DEADLOCK DETECTED deadlock_detected Class 42 — Syntax Error or Access Rule Violation