v1.5.4 [2023-09-01] Lars Kanis lars@greiz-reinsdorf.de

v1.5.3 [2023-04-28] Lars Kanis lars@greiz-reinsdorf.de

v1.5.2 [2023-04-26] Lars Kanis lars@greiz-reinsdorf.de

v1.5.1 [2023-04-24] Lars Kanis lars@greiz-reinsdorf.de

v1.5.0 [2023-04-24] Lars Kanis lars@greiz-reinsdorf.de

Enhancements:

Bugfixes:

Removed:

Repository:

v1.4.6 [2023-02-26] Lars Kanis lars@greiz-reinsdorf.de

v1.4.5 [2022-11-17] Lars Kanis lars@greiz-reinsdorf.de

v1.4.4 [2022-10-11] Lars Kanis lars@greiz-reinsdorf.de

v1.4.3 [2022-08-09] Lars Kanis lars@greiz-reinsdorf.de

v1.4.2 [2022-07-27] Lars Kanis lars@greiz-reinsdorf.de

Bugfixes:

v1.4.1 [2022-06-24] Lars Kanis lars@greiz-reinsdorf.de

Bugfixes:

v1.4.0 [2022-06-20] Lars Kanis lars@greiz-reinsdorf.de

Added:

Bugfixes:

Enhancements:

v1.3.5 [2022-03-31] Lars Kanis lars@greiz-reinsdorf.de

Bugfixes:

Enhancements:

Documentation: - Refine documentation of conn.socket_io and conn.connect_poll

v1.3.4 [2022-03-10] Lars Kanis lars@greiz-reinsdorf.de

Bugfixes:

Enhancements:

v1.3.3 [2022-02-22] Lars Kanis lars@greiz-reinsdorf.de

Bugfixes:

v1.3.2 [2022-02-14] Lars Kanis lars@greiz-reinsdorf.de

Bugfixes:

Enhancements:

v1.3.1 [2022-02-01] Michael Granger ged@FaerieMUD.org

Bugfixes:

Enhancements:

v1.3.0 [2022-01-20] Michael Granger ged@FaerieMUD.org

Install Enhancements: - Print some install help if libpq wasn't found. #396 This should help to pick the necessary package without googling. - Update Windows fat binary gem to OpenSSL-1.1.1m and PostgreSQL-14.1. - Add binary Windows gems for Ruby 3.0 and 3.1. - Make the library path of libpq available in ruby as PG::POSTGRESQL_LIB_PATH and add it to the search paths on Windows similar to rpath on Unix systems. #373 - Fall back to pkg-config if pg_config is not found. #380 - Add option to extconf.rb to disable nogvl-wrapping of libpq functions. All methods (except PG::Connection.ping) are nonblocking now, so that GVL unlock is in theory no longer necessary. However it can have some advantage in concurrency, so that GVL unlock is still enabled by default. Use: - gem inst pg – –disable-gvl-unlock

API Enhancements: - Add full compatibility to Fiber.scheduler introduced in Ruby-3.0. #397 - Add async_connect and async_send methods and add specific specs for Fiber.scheduler #342 - Add async_get_result and async_get_last_result - Add async_get_copy_data - Implement async_put_copy_data/async_put_copy_end - Implement async_reset method using the nonblocking libpq API - Add async_set_client_encoding which is compatible to scheduler - Add async_cancel as a nonblocking version of conn#cancel - Add async_encrypt_password - Run Connection.ping in a second thread. - Make discard_results scheduler friendly - Do all socket waiting through the conn.socket_io object. - Avoid PG.connect blocking while address resolution by automatically providing the hostaddr parameter and resolving in Ruby instead of libpq. - On Windows Fiber.scheduler support requires Ruby-3.1+. It is also only partly usable since may ruby IO methods are not yet scheduler aware on Windows. - Add support for pipeline mode of PostgreSQL-14. #401 - Allow specification of multiple hosts in PostgreSQL URI. #387 - Add new method conn.backend_key - used to implement our own cancel method.

Type cast enhancements: - Add PG::BasicTypeMapForQueries::BinaryData for encoding of bytea columns. #348 - Reduce time to build coder maps and permit to reuse them for several type maps per PG::BasicTypeRegistry::CoderMapsBundle.new(conn) . #376 - Make BasicTypeRegistry a class and use a global default instance of it. Now a local type registry can be instanciated and given to the type map, to avoid changing shared global states. - Allow PG::BasicTypeMapForQueries to take a Proc as callback for undefined types.

Other Enhancements: - Convert all PG classes implemented in C to TypedData objects. #349 - Support ObjectSpace.memsize_of(obj) on all classes implemented in C. #393 - Make all PG objects implemented in C memory moveable and therefore GC.compact friendly. #349 - Update errorcodes and error classes to PostgreSQL-14.0. - Add PG::CONNECTION_* constants for conn.status of newer PostgreSQL versions. - Add better support for logical replication. #339 - Change conn.socket_io to read+write mode and to a BasicSocket object instead of IO. - Use rb_io_wait() and the conn.socket_io object if available for better compatibility to Fiber.scheduler . Fall back to rb_wait_for_single_fd() on ruby < 3.0. - On Windows use a specialized wait function as a workaround for very poor performance of rb_io_wait(). #416

Bugfixes: - Release GVL while calling PQping which is a blocking method, but it didn't release GVL so far. - Fix Connection#transaction to no longer block on interrupts, for instance when pressing Ctrl-C and cancel a running query. #390 - Avoid casting of OIDs to fix compat with Redshift database. #369 - Call conn.block before each conn.get_result call to avoid possible blocking in case of a slow network and multiple query results. - Sporadic Errno::ENOTSOCK when using conn.socket_io on Windows #398

Deprecated: - Add deprecation warning to PG::BasicTypeRegistry.register_type and siblings.

Removed: - Remove support of ruby-2.2, 2.3 and 2.4. Minimum is ruby-2.5 now. - Remove support for PostgreSQL-9.2. Minimum is PostgreSQL-9.3 now. - Remove constant PG::REVISION, which was broken since pg-1.1.4.

Repository: - Replace Hoe by Bundler for gem packaging - Add Github Actions CI and testing of source and binary gems.

v1.2.3 [2020-03-18] Michael Granger ged@FaerieMUD.org

Bugfixes:

v1.2.2 [2020-01-06] Michael Granger ged@FaerieMUD.org

Enhancements:

v1.2.1 [2020-01-02] Michael Granger ged@FaerieMUD.org

Enhancements:

v1.2.0 [2019-12-20] Michael Granger ged@FaerieMUD.org

Repository: - Our primary repository has been moved to Github github.com/ged/ruby-pg . Most of the issues from bitbucket.org/ged/ruby-pg have been migrated. #43

API enhancements: - Add PG::Result#field_name_type= and siblings to allow symbols to be used as field names. #306 - Add new methods for error reporting: - PG::Connection#set_error_context_visibility - PG::Result#verbose_error_message - PG::Result#result_verbose_error_message (alias) - Update errorcodes and error classes to PostgreSQL-12.0. - New constants: PG_DIAG_SEVERITY_NONLOCALIZED, PQERRORS_SQLSTATE, PQSHOW_CONTEXT_NEVER, PQSHOW_CONTEXT_ERRORS, PQSHOW_CONTEXT_ALWAYS

Type cast enhancements: - Add PG::TextEncoder::Record and PG::TextDecoder::Record for en/decoding of Composite Types. #258, #36 - Add PG::BasicTypeRegistry.register_coder to register instances instead of classes. This is useful to register parametrized en/decoders like PG::TextDecoder::Record . - Add PG::BasicTypeMapForQueries#encode_array_as= to switch between various interpretations of ruby arrays. - Add Time, Array<Time>, Array<BigDecimal> and Array<IPAddr> encoders to PG::BasicTypeMapForQueries - Exchange sprintf based float encoder by very fast own implementation with more natural format. #301 - Define encode and decode methods only in en/decoders that implement it, so that they can be queried by respond_to? . - Improve PG::TypeMapByColumn#inspect - Accept Integer and Float as input to TextEncoder::Numeric . #310

Other enhancements: - Allocate the data part and the ruby object of PG::Result in one step, so that we don't need to check for valid data. This removes PG::Result.allocate and PG::Result.new, which were callable but without any practical use. #42 - Make use of PQresultMemorySize() of PostgreSQL-12 and fall back to our internal estimator. - Improve performance of PG::Result#stream_each_tuple . - Store client encoding in data part of PG::Connection and PG::Result objects, so that we no longer use ruby's internal encoding bits. #280 - Update Windows fat binary gem to OpenSSL-1.1.1d and PostgreSQL-12.1. - Add support for TruffleRuby. It is regularly tested as part of our CI. - Enable frozen_string_literal in all pg's ruby files

Bugfixes: - Update the license in gemspec to “BSD-2-Clause”. It was incorrectly labeled “BSD-3-Clause”. #40 - Respect PG::Coder#flags in PG::Coder#to_h. - Fix PG::Result memsize reporting after clear. - Release field names to GC on PG::Result#clear. - Fix double free in PG::Result#stream_each_tuple when an exception is raised in the block. - Fix PG::Result#stream_each_tuple to deliver typemapped values. - Fix encoding of Array<unknown> with PG::BasicTypeMapForQueries

Deprecated: - Add a deprecation warning to PG::Connection#socket .

Removed: - Remove PG::Connection#guess_result_memsize= which was temporary added in pg-1.1. - Remove PG::Result.allocate and PG::Result.new (see enhancements). - Remove support of tainted objects. #307 - Remove support of ruby-2.0 and 2.1. Minimum is ruby-2.2 now.

Documentation: - Update description of connection params. See PG::Connection.new - Link many method descriptions to corresponding libpq's documentation. - Update sync* and async* query method descriptions and document the aliases. The primary documentation is now at the async_* methods which are the default since pg-1.1. - Fix documentation of many constants

v1.1.4 [2019-01-08] Michael Granger ged@FaerieMUD.org

v1.1.3 [2018-09-06] Michael Granger ged@FaerieMUD.org

v1.1.2 [2018-08-28] Michael Granger ged@FaerieMUD.org

v1.1.1 [2018-08-27] Michael Granger ged@FaerieMUD.org

v1.1.0 [2018-08-24] Michael Granger ged@FaerieMUD.org

Deprecated (disable warnings per PG_SKIP_DEPRECATION_WARNING=1): - Forwarding conn.exec to conn.exec_params is deprecated. - Forwarding conn.exec_params to conn.exec is deprecated. - Forwarding conn.async_exec to conn.async_exec_params. - Forwarding conn.send_query to conn.send_query_params is deprecated. - Forwarding conn.async_exec_params to conn.async_exec is deprecated.

PG::Connection enhancements: - Provide PG::Connection#sync* and PG::Connection#async* query methods for explicit calling synchronous or asynchronous libpq API. - Make PG::Connection#exec and siblings switchable between sync and async API per PG::Connection.async_api= and change the default to async flavors. - Add async flavors of exec_params, prepare, exec_prepared, describe_prepared and describe_portal. They are identical to their synchronous counterpart, but make use of PostgreSQL's async API. - Replace rb_thread_fd_select() by faster rb_wait_for_single_fd() in conn.block and conn.async_exec . - Add PG::Connection#discard_results . - Raise an ArgumentError for strings containing zero bytes by escape, escape_literal, escape_identifier, quote_ident and PG::TextEncoder::Identifier. These methods previously truncated strings.

Result retrieval enhancements: - Add PG::Result#tuple_values to retrieve all field values of a row as array. - Add PG::Tuple, PG::Result#tuple and PG::Result#stream_each_tuple . PG::Tuple offers a way to lazy cast result values. - Estimate PG::Result size allocated by libpq and notify the garbage collector about it when running on Ruby-2.4 or newer. - Make the estimated PG::Result size available to ObjectSpace.memsize_of(result) .

Type cast enhancements: - Replace Ruby code by a faster C implementation of the SimpleDecoder's timestamp decode functions. github #20 - Interpret years with up to 7 digists and BC dates by timestamp decoder. - Add text timestamp decoders for UTC vs. local timezone variations. - Add text timestamp encoders for UTC timezone. - Add decoders for binary timestamps: PG::BinaryDecoder::Timestamp and variations. - Add PG::Coder#flags accessor to allow modifications of de- respectively encoder behaviour. - Add a flag to raise TypeError for invalid input values to PG::TextDecoder::Array . - Add a text decoder for inet/cidr written in C. - Add a numeric decoder written in C. - Ensure input text is zero terminated for text format in PG::Coder#decode .

Source code enhancements: - Fix headers and permission bits of various repository files.

Bugfixes: - Properly decode array with prepended dimensions. #272 For now dimension decorations are ignored, but a correct Array is returned. - Array-Decoder: Avoid leaking memory when an Exception is raised while parsing. Fixes #279

v1.0.0 [2018-01-10] Michael Granger ged@FaerieMUD.org

Deprecated: - Deprecate Ruby older than 2.2. - Deprecate Connection#socket in favor of socket_io.

Removed: - Remove compatibility code for Ruby < 2.0 and PostgreSQL < 9.2. - Remove partial compatibility with Rubinius. - Remove top-level constants PGconn, PGresult, and PGError.

Enhancements: - Update error codes to PostgreSQL-10 - Update Windows binary gems to Ruby-2.5, PostgreSQL 10.1 and OpenSSL 1.1.0g.

Bugfixes: - Fix URI detection for connection strings. #265 (thanks to jjoos) - MINGW: Workaround segfault due to GCC linker error in conjunction with MSVC. This happens when linking to PostgreSQL-10.0-x64 from EnterpriseDB.

Documentation fixes: - Add PostgreSQL version since when the given function is supported. #263 - Better documentation to encoder and decoder arguments of COPY related methods.

v0.21.0 [2017-06-12] Michael Granger ged@FaerieMUD.org

Enhancements: - Move add_dll_directory to the Runtime namespace for newest versions of RubyInstaller. - Deprecate PGconn, PGresult, and PGError top-level constants; a warning will be output the first time one of them is used. They will be removed in the upcoming 1.0 release.

Documentation fixes: - Update the docs for PG::Result#cmd_tuples

New Samples: - Add an example of the nicer copy_data way of doing COPY.

v0.20.0 [2017-03-10] Michael Granger ged@FaerieMUD.org

Enhancements: - Update error codes to PostgreSQL-9.6 - Update Windows binary gems to Ruby-2.4, PostgreSQL 9.6.1 and OpenSSL 1.0.2j. - Add support for RubyInstaller2 to Windows binary gems.

Bugfixes: - Use secure JSON methods for JSON (de)serialisation. #248 - Fix Result#inspect on a cleared result. - Fix test case that failed on Ruby-2.4. #255

Documentation fixes: - Talk about Integer instead of Fixnum. - Fix method signature of Coder#encode.

v0.19.0 [2016-09-21] Michael Granger ged@FaerieMUD.org

Enhancements: - Respect and convert character encoding of all strings sent to the server. #231 - Add PostgreSQL-9.5 functions PQsslInUse(), PQsslAttribute() and PQsslAttributeNames(). - Various documentation fixes and improvements. - Add mechanism to build without pg_config: gem install pg – –with-pg-config=ignore - Update Windows binary gems to Ruby-2.3, PostgreSQL 9.5.4 and OpenSSL 1.0.2f. - Add JSON coders and add them to BasicTypeMapForResults and BasicTypeMapBasedOnResult - Allow build from git per bundler.

Bugfixes: - Release GVL while calling PQsetClientEncoding(). #245 - Add EXTENSIONS to Solaris/SmartOS for Ruby >= 2.3.x. #236 - Fix wrong exception when running SQL while in Connection#copy_data block for output

v0.18.4 [2015-11-13] Michael Granger ged@FaerieMUD.org

Enhancements: - Fixing compilation problems with Microsoft Visual Studio 2008. GH #10 - Avoid name clash with xcode and jemalloc. PR#22, PR#23

Bugfixes: - Avoid segfault, when quote_ident or TextEncoder::Identifier is called with Array containing non-strings. #226

v0.18.3 [2015-09-03] Michael Granger ged@FaerieMUD.org

Enhancements: - Use rake-compiler-dock to build windows gems easily. - Add CI-tests on appveyor and fix test cases accordingly.

Bugfixes: - Fix data type resulting in wrong base64 encoding. - Change instance_of checks to kind_of for subclassing. #220 - TextDecoder::Date returns an actual Ruby Date instead of a Time (thanks to Thomas Ramfjord)

v0.18.2 [2015-05-14] Michael Granger ged@FaerieMUD.org

Enhancements:

Bugfixes:

v0.18.1 [2015-01-05] Michael Granger ged@FaerieMUD.org

Correct the minimum compatible Ruby version to 1.9.3. #199

v0.18.0 [2015-01-01] Michael Granger ged@FaerieMUD.org

Bugfixes: - Fix OID to Integer mapping (it is unsigned now). #187 - Fix possible segfault in conjunction with notice receiver. #185

Enhancements:

v0.17.1 [2013-12-18] Michael Granger ged@FaerieMUD.org

Bugfixes:

Documentation fixes:

v0.17.0 [2013-09-15] Michael Granger ged@FaerieMUD.org

Bugfixes:

Enhancements:

v0.16.0 [2013-07-22] Michael Granger ged@FaerieMUD.org

Bugfixes:

Documentation fixes:

Enhancements:

v0.15.1 [2013-04-08] Michael Granger ged@FaerieMUD.org

Bugfixes:

v0.15.0 [2013-03-03] Michael Granger ged@FaerieMUD.org

Bugfixes:

Documentation fixes:

Enhancements:

Specs:

v0.14.1 [2012-09-02] Michael Granger ged@FaerieMUD.org

Important bugfix:

PostgreSQL 9.2 beta fixes:

Documentation fixes:

v0.14.0 [2012-06-17] Michael Granger ged@FaerieMUD.org

Bugfixes: #47, #104

New Methods for PostgreSQL 9 and async API support: PG - ::library_version

PG::Connection - ::ping - escape_literal - escape_identifier - set_default_encoding

PG::Result - check

New Samples:

This release also comes with a collection of contributed sample scripts for doing resource-utilization reports, graphing database statistics, monitoring for replication lag, shipping WAL files for replication, automated tablespace partitioning, etc. See the samples/ directory.

v0.13.2 [2012-02-22] Michael Granger ged@FaerieMUD.org

v0.13.1 [2012-02-12] Michael Granger ged@FaerieMUD.org

v0.13.0 [2012-02-09] Michael Granger ged@FaerieMUD.org

Reorganization of modules/classes to be better Ruby citizens (with backward-compatible aliases): - Created toplevel namespace 'PG' to correspond with the gem name. - Renamed PGconn to PG::Connection (with ::PGconn alias) - Renamed PGresult to PG::Result (with ::PGresult alias) - Renamed PGError to PG::Error (with ::PGError alias) - Declare all constants inside PG::Constants, then include them in PG::Connection and PG::Result for backward-compatibility, and in PG for convenience. - Split the extension source up by class/module. - Removed old compatibility code for PostgreSQL versions < 8.3

Documentation: - Clarified licensing, updated to Ruby 1.9's license. - Merged authors list, added some missing people to the Contributor's list. - Cleaned up the sample/ directory - Making contact info a bit clearer, link to the Google+ page and the mailing list

Enhancements: - Added a convenience method: PG.connect -> PG::Connection.new

Bugfixes: - Fixed LATIN5-LATIN10 Postgres<->Ruby encoding conversions

v0.12.2 [2012-01-03] Michael Granger ged@FaerieMUD.org

v0.12.1 [2011-12-14] Michael Granger ged@FaerieMUD.org

v0.12.0 [2011-12-07] Michael Granger ged@FaerieMUD.org

v0.11.0 [2011-02-09] Michael Granger ged@FaerieMUD.org

Enhancements:

v0.10.1 [2011-01-19] Michael Granger ged@FaerieMUD.org

Bugfixes:

v0.10.0 [2010-12-01] Michael Granger ged@FaerieMUD.org

Enhancements:

Bugfixes:

v0.9.0 [2010-02-28] Michael Granger ged@FaerieMUD.org

Bugfixes.

v0.8.0 [2009-03-28] Jeff Davis davis.jeffrey@gmail.com

Bugfixes, better Windows support.