-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A "PostgreSQL" backend for the "hasql" library -- -- This library provides a "PostgreSQL" driver for the "hasql" -- library. -- -- It supports all Postgres versions starting from 8.3 and is tested -- against 8.3, 9.3 and 9.4 with the integer_datetimes setting -- off and on. -- -- According to the included benchmarks, it performs up to 2x faster than -- "postgresql-simple" and up to 7x faster than "HDBC". You can read up -- a post with analysis of those benchmarks. @package hasql-postgres @version 0.10.0 -- | Error codes. See -- http://www.postgresql.org/docs/current/interactive/errcodes-appendix.html module Hasql.Postgres.ErrorCode type ErrorCode = ByteString -- | Code "00000". successful_completion :: ErrorCode -- | Code "01000". warning :: ErrorCode -- | Code "0100C". dynamic_result_sets_returned :: ErrorCode -- | Code "01008". implicit_zero_bit_padding :: ErrorCode -- | Code "01003". null_value_eliminated_in_set_function :: ErrorCode -- | Code "01007". privilege_not_granted :: ErrorCode -- | Code "01006". privilege_not_revoked :: ErrorCode -- | Code "01004". string_data_right_truncation :: ErrorCode -- | Code "01P01". deprecated_feature :: ErrorCode -- | Code "02000". no_data :: ErrorCode -- | Code "02001". no_additional_dynamic_result_sets_returned :: ErrorCode -- | Code "03000". sql_statement_not_yet_complete :: ErrorCode -- | Code "08000". connection_exception :: ErrorCode -- | Code "08003". connection_does_not_exist :: ErrorCode -- | Code "08006". connection_failure :: ErrorCode -- | Code "08001". sqlclient_unable_to_establish_sqlconnection :: ErrorCode -- | Code "08004". sqlserver_rejected_establishment_of_sqlconnection :: ErrorCode -- | Code "08007". transaction_resolution_unknown :: ErrorCode -- | Code "08P01". protocol_violation :: ErrorCode -- | Code "09000". triggered_action_exception :: ErrorCode -- | Code "0A000". feature_not_supported :: ErrorCode -- | Code "0B000". invalid_transaction_initiation :: ErrorCode -- | Code "0F000". locator_exception :: ErrorCode -- | Code "0F001". invalid_locator_specification :: ErrorCode -- | Code "0L000". invalid_grantor :: ErrorCode -- | Code "0LP01". invalid_grant_operation :: ErrorCode -- | Code "0P000". invalid_role_specification :: ErrorCode -- | Code "0Z000". diagnostics_exception :: ErrorCode -- | Code "0Z002". stacked_diagnostics_accessed_without_active_handler :: ErrorCode -- | Code "20000". case_not_found :: ErrorCode -- | Code "21000". cardinality_violation :: ErrorCode -- | Code "22000". data_exception :: ErrorCode -- | Code "2202E". array_subscript_error :: ErrorCode -- | Code "22021". character_not_in_repertoire :: ErrorCode -- | Code "22008". datetime_field_overflow :: ErrorCode -- | Code "22012". division_by_zero :: ErrorCode -- | Code "22005". error_in_assignment :: ErrorCode -- | Code "2200B". escape_character_conflict :: ErrorCode -- | Code "22022". indicator_overflow :: ErrorCode -- | Code "22015". interval_field_overflow :: ErrorCode -- | Code "2201E". invalid_argument_for_logarithm :: ErrorCode -- | Code "22014". invalid_argument_for_ntile_function :: ErrorCode -- | Code "22016". invalid_argument_for_nth_value_function :: ErrorCode -- | Code "2201F". invalid_argument_for_power_function :: ErrorCode -- | Code "2201G". invalid_argument_for_width_bucket_function :: ErrorCode -- | Code "22018". invalid_character_value_for_cast :: ErrorCode -- | Code "22007". invalid_datetime_format :: ErrorCode -- | Code "22019". invalid_escape_character :: ErrorCode -- | Code "2200D". invalid_escape_octet :: ErrorCode -- | Code "22025". invalid_escape_sequence :: ErrorCode -- | Code "22P06". nonstandard_use_of_escape_character :: ErrorCode -- | Code "22010". invalid_indicator_parameter_value :: ErrorCode -- | Code "22023". invalid_parameter_value :: ErrorCode -- | Code "2201B". invalid_regular_expression :: ErrorCode -- | Code "2201W". invalid_row_count_in_limit_clause :: ErrorCode -- | Code "2201X". invalid_row_count_in_result_offset_clause :: ErrorCode -- | Code "22009". invalid_time_zone_displacement_value :: ErrorCode -- | Code "2200C". invalid_use_of_escape_character :: ErrorCode -- | Code "2200G". most_specific_type_mismatch :: ErrorCode -- | Code "22004". null_value_not_allowed :: ErrorCode -- | Code "22002". null_value_no_indicator_parameter :: ErrorCode -- | Code "22003". numeric_value_out_of_range :: ErrorCode -- | Code "22026". string_data_length_mismatch :: ErrorCode -- | Code "22001". string_data_right_truncation' :: ErrorCode -- | Code "22011". substring_error :: ErrorCode -- | Code "22027". trim_error :: ErrorCode -- | Code "22024". unterminated_c_string :: ErrorCode -- | Code "2200F". zero_length_character_string :: ErrorCode -- | Code "22P01". floating_point_exception :: ErrorCode -- | Code "22P02". invalid_text_representation :: ErrorCode -- | Code "22P03". invalid_binary_representation :: ErrorCode -- | Code "22P04". bad_copy_file_format :: ErrorCode -- | Code "22P05". untranslatable_character :: ErrorCode -- | Code "2200L". not_an_xml_document :: ErrorCode -- | Code "2200M". invalid_xml_document :: ErrorCode -- | Code "2200N". invalid_xml_content :: ErrorCode -- | Code "2200S". invalid_xml_comment :: ErrorCode -- | Code "2200T". invalid_xml_processing_instruction :: ErrorCode -- | Code "23000". integrity_constraint_violation :: ErrorCode -- | Code "23001". restrict_violation :: ErrorCode -- | Code "23502". not_null_violation :: ErrorCode -- | Code "23503". foreign_key_violation :: ErrorCode -- | Code "23505". unique_violation :: ErrorCode -- | Code "23514". check_violation :: ErrorCode -- | Code "23P01". exclusion_violation :: ErrorCode -- | Code "24000". invalid_cursor_state :: ErrorCode -- | Code "25000". invalid_transaction_state :: ErrorCode -- | Code "25001". active_sql_transaction :: ErrorCode -- | Code "25002". branch_transaction_already_active :: ErrorCode -- | Code "25008". held_cursor_requires_same_isolation_level :: ErrorCode -- | Code "25003". inappropriate_access_mode_for_branch_transaction :: ErrorCode -- | Code "25004". inappropriate_isolation_level_for_branch_transaction :: ErrorCode -- | Code "25005". no_active_sql_transaction_for_branch_transaction :: ErrorCode -- | Code "25006". read_only_sql_transaction :: ErrorCode -- | Code "25007". schema_and_data_statement_mixing_not_supported :: ErrorCode -- | Code "25P01". no_active_sql_transaction :: ErrorCode -- | Code "25P02". in_failed_sql_transaction :: ErrorCode -- | Code "26000". invalid_sql_statement_name :: ErrorCode -- | Code "27000". triggered_data_change_violation :: ErrorCode -- | Code "28000". invalid_authorization_specification :: ErrorCode -- | Code "28P01". invalid_password :: ErrorCode -- | Code "2B000". dependent_privilege_descriptors_still_exist :: ErrorCode -- | Code "2BP01". dependent_objects_still_exist :: ErrorCode -- | Code "2D000". invalid_transaction_termination :: ErrorCode -- | Code "2F000". sql_routine_exception :: ErrorCode -- | Code "2F005". function_executed_no_return_statement :: ErrorCode -- | Code "2F002". modifying_sql_data_not_permitted :: ErrorCode -- | Code "2F003". prohibited_sql_statement_attempted :: ErrorCode -- | Code "2F004". reading_sql_data_not_permitted :: ErrorCode -- | Code "34000". invalid_cursor_name :: ErrorCode -- | Code "38000". external_routine_exception :: ErrorCode -- | Code "38001". containing_sql_not_permitted :: ErrorCode -- | Code "38002". modifying_sql_data_not_permitted' :: ErrorCode -- | Code "38003". prohibited_sql_statement_attempted' :: ErrorCode -- | Code "38004". reading_sql_data_not_permitted' :: ErrorCode -- | Code "39000". external_routine_invocation_exception :: ErrorCode -- | Code "39001". invalid_sqlstate_returned :: ErrorCode -- | Code "39004". null_value_not_allowed' :: ErrorCode -- | Code "39P01". trigger_protocol_violated :: ErrorCode -- | Code "39P02". srf_protocol_violated :: ErrorCode -- | Code "3B000". savepoint_exception :: ErrorCode -- | Code "3B001". invalid_savepoint_specification :: ErrorCode -- | Code "3D000". invalid_catalog_name :: ErrorCode -- | Code "3F000". invalid_schema_name :: ErrorCode -- | Code "40000". transaction_rollback :: ErrorCode -- | Code "40002". transaction_integrity_constraint_violation :: ErrorCode -- | Code "40001". serialization_failure :: ErrorCode -- | Code "40003". statement_completion_unknown :: ErrorCode -- | Code "40P01". deadlock_detected :: ErrorCode -- | Code "42000". syntax_error_or_access_rule_violation :: ErrorCode -- | Code "42601". syntax_error :: ErrorCode -- | Code "42501". insufficient_privilege :: ErrorCode -- | Code "42846". cannot_coerce :: ErrorCode -- | Code "42803". grouping_error :: ErrorCode -- | Code "42P20". windowing_error :: ErrorCode -- | Code "42P19". invalid_recursion :: ErrorCode -- | Code "42830". invalid_foreign_key :: ErrorCode -- | Code "42602". invalid_name :: ErrorCode -- | Code "42622". name_too_long :: ErrorCode -- | Code "42939". reserved_name :: ErrorCode -- | Code "42804". datatype_mismatch :: ErrorCode -- | Code "42P18". indeterminate_datatype :: ErrorCode -- | Code "42P21". collation_mismatch :: ErrorCode -- | Code "42P22". indeterminate_collation :: ErrorCode -- | Code "42809". wrong_object_type :: ErrorCode -- | Code "42703". undefined_column :: ErrorCode -- | Code "42883". undefined_function :: ErrorCode -- | Code "42P01". undefined_table :: ErrorCode -- | Code "42P02". undefined_parameter :: ErrorCode -- | Code "42704". undefined_object :: ErrorCode -- | Code "42701". duplicate_column :: ErrorCode -- | Code "42P03". duplicate_cursor :: ErrorCode -- | Code "42P04". duplicate_database :: ErrorCode -- | Code "42723". duplicate_function :: ErrorCode -- | Code "42P05". duplicate_prepared_statement :: ErrorCode -- | Code "42P06". duplicate_schema :: ErrorCode -- | Code "42P07". duplicate_table :: ErrorCode -- | Code "42712". duplicate_alias :: ErrorCode -- | Code "42710". duplicate_object :: ErrorCode -- | Code "42702". ambiguous_column :: ErrorCode -- | Code "42725". ambiguous_function :: ErrorCode -- | Code "42P08". ambiguous_parameter :: ErrorCode -- | Code "42P09". ambiguous_alias :: ErrorCode -- | Code "42P10". invalid_column_reference :: ErrorCode -- | Code "42611". invalid_column_definition :: ErrorCode -- | Code "42P11". invalid_cursor_definition :: ErrorCode -- | Code "42P12". invalid_database_definition :: ErrorCode -- | Code "42P13". invalid_function_definition :: ErrorCode -- | Code "42P14". invalid_prepared_statement_definition :: ErrorCode -- | Code "42P15". invalid_schema_definition :: ErrorCode -- | Code "42P16". invalid_table_definition :: ErrorCode -- | Code "42P17". invalid_object_definition :: ErrorCode -- | Code "44000". with_check_option_violation :: ErrorCode -- | Code "53000". insufficient_resources :: ErrorCode -- | Code "53100". disk_full :: ErrorCode -- | Code "53200". out_of_memory :: ErrorCode -- | Code "53300". too_many_connections :: ErrorCode -- | Code "53400". configuration_limit_exceeded :: ErrorCode -- | Code "54000". program_limit_exceeded :: ErrorCode -- | Code "54001". statement_too_complex :: ErrorCode -- | Code "54011". too_many_columns :: ErrorCode -- | Code "54023". too_many_arguments :: ErrorCode -- | Code "55000". object_not_in_prerequisite_state :: ErrorCode -- | Code "55006". object_in_use :: ErrorCode -- | Code "55P02". cant_change_runtime_param :: ErrorCode -- | Code "55P03". lock_not_available :: ErrorCode -- | Code "57000". operator_intervention :: ErrorCode -- | Code "57014". query_canceled :: ErrorCode -- | Code "57P01". admin_shutdown :: ErrorCode -- | Code "57P02". crash_shutdown :: ErrorCode -- | Code "57P03". cannot_connect_now :: ErrorCode -- | Code "57P04". database_dropped :: ErrorCode -- | Code "58000". system_error :: ErrorCode -- | Code "58030". io_error :: ErrorCode -- | Code "58P01". undefined_file :: ErrorCode -- | Code "58P02". duplicate_file :: ErrorCode -- | Code "F0000". config_file_error :: ErrorCode -- | Code "F0001". lock_file_exists :: ErrorCode -- | Code "HV000". fdw_error :: ErrorCode -- | Code "HV005". fdw_column_name_not_found :: ErrorCode -- | Code "HV002". fdw_dynamic_parameter_value_needed :: ErrorCode -- | Code "HV010". fdw_function_sequence_error :: ErrorCode -- | Code "HV021". fdw_inconsistent_descriptor_information :: ErrorCode -- | Code "HV024". fdw_invalid_attribute_value :: ErrorCode -- | Code "HV007". fdw_invalid_column_name :: ErrorCode -- | Code "HV008". fdw_invalid_column_number :: ErrorCode -- | Code "HV004". fdw_invalid_data_type :: ErrorCode -- | Code "HV006". fdw_invalid_data_type_descriptors :: ErrorCode -- | Code "HV091". fdw_invalid_descriptor_field_identifier :: ErrorCode -- | Code "HV00B". fdw_invalid_handle :: ErrorCode -- | Code "HV00C". fdw_invalid_option_index :: ErrorCode -- | Code "HV00D". fdw_invalid_option_name :: ErrorCode -- | Code "HV090". fdw_invalid_string_length_or_buffer_length :: ErrorCode -- | Code "HV00A". fdw_invalid_string_format :: ErrorCode -- | Code "HV009". fdw_invalid_use_of_null_pointer :: ErrorCode -- | Code "HV014". fdw_too_many_handles :: ErrorCode -- | Code "HV001". fdw_out_of_memory :: ErrorCode -- | Code "HV00P". fdw_no_schemas :: ErrorCode -- | Code "HV00J". fdw_option_name_not_found :: ErrorCode -- | Code "HV00K". fdw_reply_handle :: ErrorCode -- | Code "HV00Q". fdw_schema_not_found :: ErrorCode -- | Code "HV00R". fdw_table_not_found :: ErrorCode -- | Code "HV00L". fdw_unable_to_create_execution :: ErrorCode -- | Code "HV00M". fdw_unable_to_create_reply :: ErrorCode -- | Code "HV00N". fdw_unable_to_establish_connection :: ErrorCode -- | Code "P0000". plpgsql_error :: ErrorCode -- | Code "P0001". raise_exception :: ErrorCode -- | Code "P0002". no_data_found :: ErrorCode -- | Code "P0003". too_many_rows :: ErrorCode -- | Code "XX000". internal_error :: ErrorCode -- | Code "XX001". data_corrupted :: ErrorCode -- | Code "XX002". index_corrupted :: ErrorCode -- | This module contains everything required to use "hasql" with Postgres. -- For information on how it should be used consult the "hasql" docs. -- -- Please note that there is a few limitations inflicted by Postgres, -- encoding which in the type system would seriously burden the API, so -- it was decided to make it the user's responsibility to make sure that -- certain conditions are satisfied during the runtime. Particularly this -- concerns the CxValue instances of Maybe, [] -- and Vector. For details consult the docs on those instances. module Hasql.Postgres -- | A connection to PostgreSQL. data Postgres -- | Connection settings. data Settings -- | A host, a port, a user, a password and a database. ParamSettings :: ByteString -> Word16 -> ByteString -> ByteString -> ByteString -> Settings -- | All settings encoded in a single byte string according to the -- PostgreSQL format. StringSettings :: ByteString -> Settings data CxError -- | Impossible to connect. A clarification might be given in the attached -- byte string. CantConnect :: (Maybe ByteString) -> CxError -- | Server is running an unsupported version of Postgres. The parameter is -- the version in such a format, where a value 80105 identifies -- a version 8.1.5. UnsupportedVersion :: Int -> CxError data TxError -- | Received no response from the database. NoResult :: !(Maybe ByteString) -> TxError -- | An error reported by the DB. Code, message, details, hint. -- --