v? upcoming ===================== v0.29.0 2024-11-05 ===================== * fix: enable SNI (thanks @conradludgate) * Drop official support for Postgres v11 * Support encoding PG::Interval params (thanks @Blacksmoke16) * Encode Crystal enum args as integers (thanks @jgaskins) * Handle Array(Bytes) encoding for query params containing non-Unicode text (thanks @jgaskins) * Avoid calling LibC.getuid on windows v0.28.0 2023-12-21 ===================== * Add support for application_name in UIR paramaters and the PGAPPNAME env var (thanks @cyberdelia) * Fix error when used with non-postgres database drivers (thanks @ysbaddaden) * Update crystal-db to 0.13 (thanks @jgaskins, @bcardiff) v0.27.0 2023-06-25 ===================== * Add support for LSN data type (thanks @louiseGrandjonc) * Add support for ENV vars (PGPORT, PGUSER, PGHOST, PGDATABASE, PGPASS) and pgpass files (thanks @wishdev) * timestamptz now parse into the connection's timezone if set (thanks @jgaskins) * add `sslmode=disable` to prevent TLS negotiation (thanks @ellmetha) * update to crystal-db 0.12.0 (refactor connection factory) (thanks @bcardiff) v0.26.0 2022-01-27 ===================== * Update crystal-db to 0.11. This requires Crystal 1.0.0 or later. * Drop official support for all 9.x versions. v0.25.0 2022-01-27 ===================== * Add defense-in-depth for CVE-2021-23222 * Add scram-sha-256-plus "scram with channel binding". If your version of postgres does support this, you should provide only this as your `auth_methods` in order to exclude the non-plus/non-channel-binding version of scram, as it's possible for a MITM to downgrade if the non-plus version is on the list. However this driver can't remove support for the non-plus version since not all supported versions of postgres support channel binding. * Give a name to error notice field V (the same as S/severity but not localized) * Add support for decoding arrays of UUIDs (thanks @jwoertink) * Allow socket connections to have paramaters from URIs (thanks @grepsedawk) * Allow blocking connections to PG.connect_listen * Properly encode null values in arrays (thanks @robcole and @grepsedawk) v0.24.0 2021-07-21 ===================== * Decode json columns as JSON::PullParser instead of JSON::Any (thanks @matthewmcgarvey) v0.23.2 2021-03-27 ===================== * Greatly reduce CPU consumption while reading result sets (thanks @jgaskins) v0.23.1 2021-01-30 ===================== * update for Crystal 0.36.0 (thanks @bcardiff) v0.23.0 2021-01-12 ===================== * (breaking) Numeric#to_f for NaN now returns a NaN float instead of 0.0 * add auth_methods config setting to control which methods the client can accpet. Defaults to `scram-sha-256` and `md5`. Also optionally adds support for `cleartext`, but it is not on by default as simply having this on can let MITM attackers steal your password. (thanks @straight-shoota) * add support for decoding interval type (thanks @pascalbetz) * Postgres 13 is now officially supported and tested on CI and Postgres 9.4 support has ended, though as the postgres protocol itself hasn't changed, it still probably works. * Fix overflow for Numeric#to_f for numerics with many digits. This change potentially introduces more floating point errors. If you require full precision use the optional big rational conversion instead. * Read Slice(UInt8) as String if given as type. This allows text datayptes with unstable OIDs such as citext to be more easliy used. (thanks @matthewmcgarvey) * Add UUIDs to array decoders (thanks @jwoertink) v0.22.1 2020-10-12 ===================== * fix shard.yml mistake in v0.22.0 v0.22.0 2020-10-07 ===================== * (breaking) UUIDs decode into UUID type instead of String (thanks @jgaskins) * Update crystal-db to 0.10 for logging support (thanks @bcardiff) v0.21.1 2020-06-09 ===================== * Support Crystal v0.35.0 (thanks @bcardiff) v0.21.0 2020-04-08 ===================== * Support Crystal v0.34.0 (thanks @straight-shoota, @bcardiff) * Update crystal db support to 0.9.0 (thanks @bcardiff) * Add Error Handling sample in README (thanks @ArtLinkov) v0.20.0 2019-12-17 ===================== * bugfix: negative bigint decoding (thanks @asterite) * Update crystal db support to 0.8.0 (thanks @bcardiff) v0.19.0 2019-09-21 ===================== * fix ipv6 hostnames (thanks @j8r) * Update crystal db support to 0.7.0 (thanks @bcardiff) v0.18.1 2019-08-09 ===================== * bugfix: Fix Time encoding for non-zero-offset times (thanks @straight-shoota) v0.18.0 2019-08-04 ===================== * Add SCRAM-SHA-256 support * NOTE: SASLPrep is missing as of this realease, so not all passwords work * Fix reading large number of UUIDs (thanks @asterite) * Correctly encode timestamp values to consider microseconds (thanks @asterite) * Update crystal db support to 0.6.0 (thanks @bcardiff) v0.17.0 2019-07-19 ===================== * Add `Enumerable` channels overload for `PG.connect_listen` (thanks @vladfaust) * Fixes Time.new deprecation warning (thanks @bcardiff) * Ensure PQ::Connection#do_close does not raise (thanks @bcardiff) * Fix IOError on closed connection (thanks @omarroth) * Array fixes (thanks @asterite) * properly handle exceptions during decoding array * add Numeric#inspect * prevent decoding array of numeric as floats * internal: map each type to decoder v0.16.1 2019-04-15 ===================== * Support Crystal v0.28.0 (thanks @bcardiff) * Fix support for reading a NoticeResponse at row start (thanks @straight-shoota) v0.16.0 2019-04-02 ===================== * Support connection negotiation without BackendKeyData frame (thanks @rx14) * Make connection client encoding check case insesitive (thanks @yumoose) * Support client cert auth (thanks @sanderhahn) * Fix reading null when expecting array (thanks @straight-shoota) * Fix encoding string arrays with special characters (thanks @straight-shoota) * Fix version parser (thanks @straight-shoota) v0.15.0 2018-06-15 ===================== * Support Crystal v0.25 (thanks @greenbigfrog) * fix PG::Numeric#to_s on numbers with >= weight than ndigits, eg 800000 (#133) * fix PG::Numeric#to_s on numbers where the `digits` expected to be zero padded and other cases (#134) * Set cause when raising DB::ConnectionRefused (thanks @rx14) v0.14.1 2017-12-26 ===================== * Update crystal db support to 0.5.0 (thanks @bcardiff) v0.14.0 2017-12-26 ===================== * Support Crystal v0.24, breaks support for older versions * Support Postgres v10.0+ new two digit version scheme in #version v0.13.4 2017-10-16 ===================== * fix CI (thanks @waghanza) * bugfix: make sure to read all nulls (thanks @ZeWebDev) * bugfix: no longer hangs on unhandeled exceptions (thanks @bigtunacan) v0.13.3 2017-03-21 ===================== * Increased precision when encoding times * Use DB.connect in ListenConnection to avoid creating a connection pool (thanks @bcardiff) * Updates to use db 0.4.0. (thanks again @bcardiff) v0.13.2 2017-02-21 ===================== * update to crystal 0.21.0 (thanks @felipeelias) v0.13.1 2016-12-25 ===================== * update to crystal 0.20.3 (thanks @bcardiff) v0.13.0 2016-12-21 ===================== * Update to support crystal-db's connection pooling (thanks @bcardiff) v0.12.0 2016-12-10 ===================== * Uses crystal-db api (thanks @asterite) v0.11.0 2016-09-04 ===================== * Adds dedicated LISTEN connection v0.10.0 2016-09-03 ===================== * Adds support for array types v0.9.1 2016-08-23 ===================== * Wrap query execution in a mutext to prevent protocol desynchronization v0.9.0 2016-07-26 ===================== * remove support for plaintext auth to prevent downgrade mitm attacks * fix for multibyte characters in query strings v0.8.0 2016-06-17 ===================== * (breaking) geo points now all have own types (thanks @asterite) * support crystal 0.18 v0.7.1 2016-05-15 ===================== * (breaking) unknown oids decoded as byte slices instead of string * fix shard.yml * Adds optional BigRational extension to PG::Numeric * bugfixes in protocol * adds geo types v0.7.0 2016-05-05 ===================== new features * 100% crystal, using crystal's native async io (no longer using libpq) * each Connection#exec form can take a block, and stream the rows as they come in. This does not store any rows in memory and is very fast. * adds #on_notification for listen/notify support incompatable changes: * Result.each now yields the entire row and an array of fields * The notice callback now yields an entire * Error classes have changed, some removed * "db_name" changed to "dbname" in hash #initialize to match postgres * on_notice callback gets an object instead of just a string v0.6.1 2016-05-15 ==================== * fix shard.yml v0.6.0 2016-05-04 ==================== * Adds Adds on_notice callback (thanks @radiospiel) * Adds PG::Numeric for numeric/decimal support * Note: this will be the last release that links LibPQ v0.5.0 2015-12-21 ==================== * Adds Result#each which allows to map a PG result to a struct or class, avoiding temporary memory structures (thanks @ysbaddaden) * Connection#exec is now async (thanks @ysbaddaden) v0.4.3 2015-10-21 ==================== * Support for byta (thanks @jhass) * `Connection`s can be made with a hash of params (thanks @tebakane) * Support Crystal 0.9.0 and bytea encoding fix (thanks @technorama) v0.4.2 2015-09-29 ==================== * fix UUIDs to have appropriate dashes v0.4.1 2015-09-29 ==================== * Fix UUID type v0.4.0 2015-09-19 ==================== * Fix and require Crystal 0.8.0 * Allow #to_hash with typed querying interface (thanks @werner) v0.3.2 2015-08-28 ==================== * Connection#exec_all (thanks @solisoft) * BUGFIX: bigint and smallint were broken since v0.3.0 v0.3.1 2015-08-25 ==================== * BUGFIX: previous release would give wrong reults under --release * 3x fater again on time parsing, total ~10x faster than text format v0.3.0 2015-08-24 ==================== * switch to much faster binary result format (time parsing 3.4x faster than text) * decoders are now pluggable with PG::Decoder.register_decoder v0.2.0 2015-07-25 ==================== * Add Connection#escape_literal and Connection#escape_identifier v0.1.0 2015-06-14 ==================== * first named version using crystal shards