Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-pg for openSUSE:Factory 
checked in at 2022-10-30 18:28:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-pg (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-pg.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-pg"

Sun Oct 30 18:28:57 2022 rev:44 rq:1032152 version:1.4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-pg/rubygem-pg.changes    2022-09-03 
23:19:01.887808155 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-pg.new.2275/rubygem-pg.changes  
2022-10-30 18:29:14.282514737 +0100
@@ -1,0 +2,17 @@
+Fri Oct 28 05:03:15 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.4.4
+ see installed History.rdoc
+
+  == v1.4.4 [2022-10-11] Lars Kanis <[email protected]>
+  
+  - Revert to let libpq do the host iteration while connecting. #485
+    Ensure that parameter `connect_timeout` is still respected.
+  - Handle multiple hosts in the connection string, where only one host has 
writable session. #476
+  - Add some useful information to PG::Connection#inspect. #487
+  - Support new pgresult_stream_any API in sequel_pg-1.17.0. #481
+  - Update Windows fat binary gem to PostgreSQL-14.5.
+  
+  
+
+-------------------------------------------------------------------

Old:
----
  pg-1.4.3.gem

New:
----
  pg-1.4.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-pg.spec ++++++
--- /var/tmp/diff_new_pack.81BOnG/_old  2022-10-30 18:29:15.750522670 +0100
+++ /var/tmp/diff_new_pack.81BOnG/_new  2022-10-30 18:29:15.754522691 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-pg
-Version:        1.4.3
+Version:        1.4.4
 Release:        0
 %define mod_name pg
 %define mod_full_name %{mod_name}-%{version}

++++++ pg-1.4.3.gem -> pg-1.4.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.github/workflows/binary-gems.yml 
new/.github/workflows/binary-gems.yml
--- old/.github/workflows/binary-gems.yml       2022-08-09 16:42:03.000000000 
+0200
+++ new/.github/workflows/binary-gems.yml       2022-10-11 13:30:28.000000000 
+0200
@@ -45,7 +45,7 @@
         include:
           - ruby: "3.1"
             platform: "x64-mingw-ucrt"
-            PGVERSION: 14.2-1-windows-x64
+            PGVERSION: 15.0-rc1-windows-x64
           - ruby: "2.5"
             platform: "x64-mingw32"
             PGVERSION: 10.20-1-windows
@@ -83,4 +83,4 @@
       - run: bundle install
       - run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
       - name: Run specs
-        run: ruby -rpg -S rspec spec/**/*_spec.rb
+        run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.github/workflows/source-gem.yml 
new/.github/workflows/source-gem.yml
--- old/.github/workflows/source-gem.yml        2022-08-09 16:42:03.000000000 
+0200
+++ new/.github/workflows/source-gem.yml        2022-10-11 13:30:28.000000000 
+0200
@@ -31,7 +31,7 @@
         include:
           - os: windows
             ruby: "head"
-            PGVERSION: 14.2-1-windows-x64
+            PGVERSION: 15.0-rc1-windows-x64
             PGVER: "14"
           - os: windows
             ruby: "2.5"
@@ -54,13 +54,14 @@
             PGVER: "14"
           - os: macos
             ruby: "head"
-            PGVERSION: 14.2-1-osx
-            PGVER: "14"
+            PGVERSION: 13.8-1-osx
+            PGVER: "13"
 
     runs-on: ${{ matrix.os }}-latest
     env:
       PGVERSION: ${{ matrix.PGVERSION }}
       PGVER: ${{ matrix.PGVER }}
+      MAKE: make -j2 V=1
 
     steps:
       - uses: actions/checkout@v2
@@ -107,8 +108,9 @@
         if: matrix.os == 'macos'
         run: |
           wget 
https://get.enterprisedb.com/postgresql/postgresql-$PGVERSION-binaries.zip && \
-          unzip postgresql-$PGVERSION-binaries.zip && \
-          echo `pwd`/pgsql/bin >> $GITHUB_PATH
+          sudo mkdir -p /Library/PostgreSQL && \
+          sudo unzip postgresql-$PGVERSION-binaries.zip -d 
/Library/PostgreSQL/$PGVER && \
+          echo /Library/PostgreSQL/$PGVER/bin >> $GITHUB_PATH
 
       - run: gem update --system
       - run: bundle install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.rdoc new/History.rdoc
--- old/History.rdoc    2022-08-09 16:42:03.000000000 +0200
+++ new/History.rdoc    2022-10-11 13:30:28.000000000 +0200
@@ -1,3 +1,13 @@
+== v1.4.4 [2022-10-11] Lars Kanis <[email protected]>
+
+- Revert to let libpq do the host iteration while connecting. #485
+  Ensure that parameter `connect_timeout` is still respected.
+- Handle multiple hosts in the connection string, where only one host has 
writable session. #476
+- Add some useful information to PG::Connection#inspect. #487
+- Support new pgresult_stream_any API in sequel_pg-1.17.0. #481
+- Update Windows fat binary gem to PostgreSQL-14.5.
+
+
 == v1.4.3 [2022-08-09] Lars Kanis <[email protected]>
 
 - Avoid memory bloat possible in put_copy_data in pg-1.4.0 to 1.4.2. #473
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     2022-08-09 16:42:03.000000000 +0200
+++ new/README.rdoc     2022-10-11 13:30:28.000000000 +0200
@@ -171,12 +171,31 @@
 To report bugs, suggest features, or check out the source with Git,
 {check out the project page}[https://github.com/ged/ruby-pg].
 
-After checking out the source, run:
+After checking out the source, install all dependencies:
 
-    $ rake newb
+    $ bundle install
 
-This task will install any missing dependencies, run the tests/specs, and
-generate the API documentation.
+Cleanup extension files, packaging files, test databases:
+
+    $ rake clean
+
+Compile extension:
+
+    $ rake compile
+
+Run tests/specs with PostgreSQL tools like `initdb` in the path:
+
+    $ PATH=$PATH:/usr/lib/postgresql/14/bin rake test
+
+Or run a specific test with the line number:
+
+    $ PATH=$PATH:/usr/lib/postgresql/14/bin rspec -Ilib -fd 
spec/pg/connection_spec.rb:455
+
+Generate the API documentation:
+
+    $ rake docs
+
+Make sure, that all bugs and new features are verified by tests.
 
 The current maintainers are Michael Granger <[email protected]> and
 Lars Kanis <[email protected]>.
@@ -184,7 +203,7 @@
 
 == Copying
 
-Copyright (c) 1997-2019 by the authors.
+Copyright (c) 1997-2022 by the authors.
 
 * Jeff Davis <[email protected]>
 * Guy Decoux (ts) <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2022-08-09 16:42:03.000000000 +0200
+++ new/Rakefile        2022-10-11 13:30:28.000000000 +0200
@@ -16,14 +16,14 @@
 EXTDIR  = BASEDIR + 'ext'
 PKGDIR  = BASEDIR + 'pkg'
 TMPDIR  = BASEDIR + 'tmp'
-TESTDIR = BASEDIR + "tmp_test_specs"
+TESTDIR = BASEDIR + "tmp_test_*"
 
 DLEXT   = RbConfig::CONFIG['DLEXT']
 EXT     = LIBDIR + "pg_ext.#{DLEXT}"
 
 GEMSPEC = 'pg.gemspec'
 
-CLOBBER.include( TESTDIR.to_s )
+CLEAN.include( TESTDIR.to_s )
 CLEAN.include( PKGDIR.to_s, TMPDIR.to_s )
 CLEAN.include "lib/*/libpq.dll"
 CLEAN.include "lib/pg_ext.*"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile.cross new/Rakefile.cross
--- old/Rakefile.cross  2022-08-09 16:42:03.000000000 +0200
+++ new/Rakefile.cross  2022-10-11 13:30:28.000000000 +0200
@@ -32,7 +32,7 @@
 
                # Cross-compilation constants
                self.openssl_version            = ENV['OPENSSL_VERSION'] || 
'1.1.1q'
-               self.postgresql_version         = ENV['POSTGRESQL_VERSION'] || 
'14.4'
+               self.postgresql_version         = ENV['POSTGRESQL_VERSION'] || 
'14.5'
 
                # Check if symlinks work in the current working directory.
                # This fails, if rake-compiler-dock is running on a Windows box.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/checksums.yaml.gz.sig new/checksums.yaml.gz.sig
--- old/checksums.yaml.gz.sig   2022-08-09 16:42:03.000000000 +0200
+++ new/checksums.yaml.gz.sig   2022-10-11 13:30:28.000000000 +0200
@@ -1,3 +1 @@
-???    
hS????5r??'p?*?\V??????c?4^??f?<????u??S??b??*\????$l??sC??l$??D9?.M???????*
?d???Mf??D?      ???????k??p=?FM?
-????????A?U^???9'??N?@}x?Jv
-=2C?W7??sG?@???4?X?{??BQ??6-??b?-Q?V? 
y?P???????k?[?<!???'????6e;b??6?R?G?y+?\?}????x?>_?_??>?J      
??z?????[??]??R????fW&Z%s???#??%:@?X'?!k??[$?z.?,8??FB50U      
y????w?+T-)??????q*%?q0AS?{?\p???b*?
\ No newline at end of file
+}?"?????B?`?5?'??????1??d?x?;?        ?Y?=?r4S?y??Z??3??R$Z2??
V7O@?????m6??%???P????~???0{????h???4? 
D?:??`??4?eb????%???e'4????X?E?%$k???n?.?Yw#????   
???-|#@n=???^?V?b?I>?????????o*l?O?5????UU?chR??????+?I??G???????'6Z?$#?_1W??Ah3?
\ No newline at end of file
Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg.c new/ext/pg.c
--- old/ext/pg.c        2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg.c        2022-10-11 13:30:28.000000000 +0200
@@ -47,7 +47,6 @@
  */
 
 #include "pg.h"
-#include "pg_config.h"
 
 int pg_skip_deprecation_warning;
 VALUE rb_mPG;
@@ -353,7 +352,7 @@
  **************************************************************************/
 
 void
-Init_pg_ext()
+Init_pg_ext(void)
 {
        if( RTEST(rb_eval_string("ENV['PG_SKIP_DEPRECATION_WARNING']")) ){
                /* Set all bits to disable all deprecation warnings. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg.h new/ext/pg.h
--- old/ext/pg.h        2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg.h        2022-10-11 13:30:28.000000000 +0200
@@ -57,6 +57,7 @@
 #endif
 
 /* PostgreSQL headers */
+#include "pg_config.h"
 #include "libpq-fe.h"
 #include "libpq/libpq-fs.h"              /* large-object interface */
 #include "pg_config_manual.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_binary_decoder.c new/ext/pg_binary_decoder.c
--- old/ext/pg_binary_decoder.c 2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_binary_decoder.c 2022-10-11 13:30:28.000000000 +0200
@@ -205,7 +205,7 @@
  */
 
 void
-init_pg_binary_decoder()
+init_pg_binary_decoder(void)
 {
        /* This module encapsulates all decoder classes with binary input 
format */
        rb_mPG_BinaryDecoder = rb_define_module_under( rb_mPG, "BinaryDecoder" 
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_binary_encoder.c new/ext/pg_binary_encoder.c
--- old/ext/pg_binary_encoder.c 2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_binary_encoder.c 2022-10-11 13:30:28.000000000 +0200
@@ -139,7 +139,7 @@
 }
 
 void
-init_pg_binary_encoder()
+init_pg_binary_encoder(void)
 {
        /* This module encapsulates all encoder classes with binary output 
format */
        rb_mPG_BinaryEncoder = rb_define_module_under( rb_mPG, "BinaryEncoder" 
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_coder.c new/ext/pg_coder.c
--- old/ext/pg_coder.c  2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_coder.c  2022-10-11 13:30:28.000000000 +0200
@@ -537,7 +537,7 @@
 
 
 void
-init_pg_coder()
+init_pg_coder(void)
 {
        s_id_encode = rb_intern("encode");
        s_id_decode = rb_intern("decode");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_connection.c new/ext/pg_connection.c
--- old/ext/pg_connection.c     2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_connection.c     2022-10-11 13:30:28.000000000 +0200
@@ -1527,8 +1527,7 @@
  * It's not recommended to use explicit sync or async variants but 
#describe_portal instead, unless you have a good reason to do so.
  */
 static VALUE
-pgconn_sync_describe_portal(self, stmt_name)
-       VALUE self, stmt_name;
+pgconn_sync_describe_portal(VALUE self, VALUE stmt_name)
 {
        PGresult *result;
        VALUE rb_pgresult;
@@ -4326,7 +4325,7 @@
  * Document-class: PG::Connection
  */
 void
-init_pg_connection()
+init_pg_connection(void)
 {
        s_id_encode = rb_intern("encode");
        s_id_autoclose_set = rb_intern("autoclose=");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_copy_coder.c new/ext/pg_copy_coder.c
--- old/ext/pg_copy_coder.c     2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_copy_coder.c     2022-10-11 13:30:28.000000000 +0200
@@ -592,7 +592,7 @@
 
 
 void
-init_pg_copycoder()
+init_pg_copycoder(void)
 {
        /* Document-class: PG::CopyCoder < PG::Coder
         *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_errors.c new/ext/pg_errors.c
--- old/ext/pg_errors.c 2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_errors.c 2022-10-11 13:30:28.000000000 +0200
@@ -70,7 +70,7 @@
 }
 
 void
-init_pg_errors()
+init_pg_errors(void)
 {
        rb_hErrors = rb_hash_new();
        rb_define_const( rb_mPG, "ERROR_CLASSES", rb_hErrors );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_record_coder.c new/ext/pg_record_coder.c
--- old/ext/pg_record_coder.c   2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_record_coder.c   2022-10-11 13:30:28.000000000 +0200
@@ -494,7 +494,7 @@
 
 
 void
-init_pg_recordcoder()
+init_pg_recordcoder(void)
 {
        /* Document-class: PG::RecordCoder < PG::Coder
         *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_result.c new/ext/pg_result.c
--- old/ext/pg_result.c 2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_result.c 2022-10-11 13:30:28.000000000 +0200
@@ -1382,21 +1382,20 @@
 }
 
 
-static void
+static int
 yield_hash(VALUE self, int ntuples, int nfields, void *data)
 {
        int tuple_num;
-       t_pg_result *this = pgresult_get_this(self);
        UNUSED(nfields);
 
        for(tuple_num = 0; tuple_num < ntuples; tuple_num++) {
                rb_yield(pgresult_aref(self, INT2NUM(tuple_num)));
        }
 
-       pgresult_clear( this );
+       return 1; /* clear the result */
 }
 
-static void
+static int
 yield_array(VALUE self, int ntuples, int nfields, void *data)
 {
        int row;
@@ -1413,10 +1412,10 @@
                rb_yield( rb_ary_new4( nfields, row_values ));
        }
 
-       pgresult_clear( this );
+       return 1; /* clear the result */
 }
 
-static void
+static int
 yield_tuple(VALUE self, int ntuples, int nfields, void *data)
 {
        int tuple_num;
@@ -1434,11 +1433,12 @@
                VALUE tuple = pgresult_tuple(copy, INT2FIX(tuple_num));
                rb_yield( tuple );
        }
+       return 0; /* don't clear the result */
 }
 
 /* Non-static, and data pointer for use by sequel_pg */
 VALUE
-pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int, void*), void* 
data)
+pgresult_stream_any(VALUE self, int (*yielder)(VALUE, int, int, void*), void* 
data)
 {
        t_pg_result *this;
        int nfields;
@@ -1467,7 +1467,9 @@
                                pg_result_check( self );
                }
 
-               yielder( self, ntuples, nfields, data );
+               if( yielder( self, ntuples, nfields, data ) ){
+                       pgresult_clear( this );
+               }
 
                if( gvl_PQisBusy(pgconn) ){
                        /* wait for input (without blocking) before reading 
each result */
@@ -1617,7 +1619,7 @@
 }
 
 void
-init_pg_result()
+init_pg_result(void)
 {
        sym_string = ID2SYM(rb_intern("string"));
        sym_symbol = ID2SYM(rb_intern("symbol"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_text_decoder.c new/ext/pg_text_decoder.c
--- old/ext/pg_text_decoder.c   2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_text_decoder.c   2022-10-11 13:30:28.000000000 +0200
@@ -923,7 +923,7 @@
 }
 
 void
-init_pg_text_decoder()
+init_pg_text_decoder(void)
 {
        rb_require("ipaddr");
        s_IPAddr = rb_funcall(rb_cObject, rb_intern("const_get"), 1, 
rb_str_new2("IPAddr"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_text_encoder.c new/ext/pg_text_encoder.c
--- old/ext/pg_text_encoder.c   2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_text_encoder.c   2022-10-11 13:30:28.000000000 +0200
@@ -775,7 +775,7 @@
 
 
 void
-init_pg_text_encoder()
+init_pg_text_encoder(void)
 {
        s_id_encode = rb_intern("encode");
        s_id_to_i = rb_intern("to_i");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_tuple.c new/ext/pg_tuple.c
--- old/ext/pg_tuple.c  2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_tuple.c  2022-10-11 13:30:28.000000000 +0200
@@ -545,7 +545,7 @@
 }
 
 void
-init_pg_tuple()
+init_pg_tuple(void)
 {
        rb_cPG_Tuple = rb_define_class_under( rb_mPG, "Tuple", rb_cObject );
        rb_define_alloc_func( rb_cPG_Tuple, pg_tuple_s_allocate );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map.c new/ext/pg_type_map.c
--- old/ext/pg_type_map.c       2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map.c       2022-10-11 13:30:28.000000000 +0200
@@ -176,7 +176,7 @@
 }
 
 void
-init_pg_type_map()
+init_pg_type_map(void)
 {
        s_id_fit_to_query = rb_intern("fit_to_query");
        s_id_fit_to_result = rb_intern("fit_to_result");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map_all_strings.c 
new/ext/pg_type_map_all_strings.c
--- old/ext/pg_type_map_all_strings.c   2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map_all_strings.c   2022-10-11 13:30:28.000000000 +0200
@@ -105,7 +105,7 @@
 
 
 void
-init_pg_type_map_all_strings()
+init_pg_type_map_all_strings(void)
 {
        /*
         * Document-class: PG::TypeMapAllStrings < PG::TypeMap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map_by_class.c 
new/ext/pg_type_map_by_class.c
--- old/ext/pg_type_map_by_class.c      2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map_by_class.c      2022-10-11 13:30:28.000000000 +0200
@@ -247,7 +247,7 @@
 }
 
 void
-init_pg_type_map_by_class()
+init_pg_type_map_by_class(void)
 {
        /*
         * Document-class: PG::TypeMapByClass < PG::TypeMap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map_by_column.c 
new/ext/pg_type_map_by_column.c
--- old/ext/pg_type_map_by_column.c     2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map_by_column.c     2022-10-11 13:30:28.000000000 +0200
@@ -243,7 +243,7 @@
 }
 
 VALUE
-pg_tmbc_allocate()
+pg_tmbc_allocate(void)
 {
        return pg_tmbc_s_allocate(rb_cTypeMapByColumn);
 }
@@ -320,7 +320,7 @@
 }
 
 void
-init_pg_type_map_by_column()
+init_pg_type_map_by_column(void)
 {
        s_id_decode = rb_intern("decode");
        s_id_encode = rb_intern("encode");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map_by_mri_type.c 
new/ext/pg_type_map_by_mri_type.c
--- old/ext/pg_type_map_by_mri_type.c   2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map_by_mri_type.c   2022-10-11 13:30:28.000000000 +0200
@@ -286,7 +286,7 @@
 }
 
 void
-init_pg_type_map_by_mri_type()
+init_pg_type_map_by_mri_type(void)
 {
        /*
         * Document-class: PG::TypeMapByMriType < PG::TypeMap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map_by_oid.c new/ext/pg_type_map_by_oid.c
--- old/ext/pg_type_map_by_oid.c        2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map_by_oid.c        2022-10-11 13:30:28.000000000 +0200
@@ -356,7 +356,7 @@
 
 
 void
-init_pg_type_map_by_oid()
+init_pg_type_map_by_oid(void)
 {
        s_id_decode = rb_intern("decode");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_type_map_in_ruby.c 
new/ext/pg_type_map_in_ruby.c
--- old/ext/pg_type_map_in_ruby.c       2022-08-09 16:42:03.000000000 +0200
+++ new/ext/pg_type_map_in_ruby.c       2022-10-11 13:30:28.000000000 +0200
@@ -299,7 +299,7 @@
 
 
 void
-init_pg_type_map_in_ruby()
+init_pg_type_map_in_ruby(void)
 {
        s_id_fit_to_result = rb_intern("fit_to_result");
        s_id_fit_to_query = rb_intern("fit_to_query");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pg/connection.rb new/lib/pg/connection.rb
--- old/lib/pg/connection.rb    2022-08-09 16:42:03.000000000 +0200
+++ new/lib/pg/connection.rb    2022-10-11 13:30:28.000000000 +0200
@@ -93,6 +93,27 @@
                return connect_hash_to_string(iopts)
        end
 
+       # Return a String representation of the object suitable for debugging.
+       def inspect
+               str = self.to_s
+               str[-1,0] = if finished?
+                       " finished"
+               else
+                       stats = []
+                       stats << " status=#{ 
PG.constants.grep(/CONNECTION_/).find{|c| PG.const_get(c) == status} }" if 
status != CONNECTION_OK
+                       stats << " transaction_status=#{ 
PG.constants.grep(/PQTRANS_/).find{|c| PG.const_get(c) == transaction_status} 
}" if transaction_status != PG::PQTRANS_IDLE
+                       stats << " nonblocking=#{ isnonblocking }" if 
isnonblocking
+                       stats << " pipeline_status=#{ 
PG.constants.grep(/PQ_PIPELINE_/).find{|c| PG.const_get(c) == pipeline_status} 
}" if respond_to?(:pipeline_status) && pipeline_status != PG::PQ_PIPELINE_OFF
+                       stats << " client_encoding=#{ get_client_encoding }" if 
get_client_encoding != "UTF8"
+                       stats << " type_map_for_results=#{ 
type_map_for_results.to_s }" unless 
type_map_for_results.is_a?(PG::TypeMapAllStrings)
+                       stats << " type_map_for_queries=#{ 
type_map_for_queries.to_s }" unless 
type_map_for_queries.is_a?(PG::TypeMapAllStrings)
+                       stats << " encoder_for_put_copy_data=#{ 
encoder_for_put_copy_data.to_s }" if encoder_for_put_copy_data
+                       stats << " decoder_for_get_copy_data=#{ 
decoder_for_get_copy_data.to_s }" if decoder_for_get_copy_data
+                       " host=#{host} port=#{port} user=#{user}#{stats.join}"
+               end
+               return str
+       end
+
        #  call-seq:
        #     conn.copy_data( sql [, coder] ) {|sql_result| ... } -> PG::Result
        #
@@ -555,14 +576,17 @@
                if (timeo = conninfo_hash[:connect_timeout].to_i) && timeo > 0
                        # Lowest timeout is 2 seconds - like in libpq
                        timeo = [timeo, 2].max
-                       stop_time = timeo + 
Process.clock_gettime(Process::CLOCK_MONOTONIC)
+                       host_count = conninfo_hash[:host].to_s.count(",") + 1
+                       stop_time = timeo * host_count + 
Process.clock_gettime(Process::CLOCK_MONOTONIC)
                end
 
                poll_status = PG::PGRES_POLLING_WRITING
                until poll_status == PG::PGRES_POLLING_OK ||
                                poll_status == PG::PGRES_POLLING_FAILED
 
-                       timeout = 
stop_time&.-(Process.clock_gettime(Process::CLOCK_MONOTONIC))
+                       # Set single timeout to parameter "connect_timeout" but
+                       # don't exceed total connection time of number-of-hosts 
* connect_timeout.
+                       timeout = [timeo, stop_time - 
Process.clock_gettime(Process::CLOCK_MONOTONIC)].min if stop_time
                        event = if !timeout || timeout >= 0
                                # If the socket needs to read, wait 'til it 
becomes readable to poll again
                                case poll_status
@@ -600,7 +624,6 @@
 
                        # Check to see if it's finished or failed yet
                        poll_status = send( poll_meth )
-                       @last_status = status unless [PG::CONNECTION_BAD, 
PG::CONNECTION_OK].include?(status)
                end
 
                unless status == PG::CONNECTION_OK
@@ -691,84 +714,49 @@
                        iopts = 
PG::Connection.conninfo_parse(option_string).each_with_object({}){|h, o| 
o[h[:keyword].to_sym] = h[:val] if h[:val] }
                        iopts = 
PG::Connection.conndefaults.each_with_object({}){|h, o| o[h[:keyword].to_sym] = 
h[:val] if h[:val] }.merge(iopts)
 
-                       errors = []
                        if iopts[:hostaddr]
                                # hostaddr is provided -> no need to resolve 
hostnames
-                               ihostaddrs = iopts[:hostaddr].split(",", -1)
-
-                               ihosts = iopts[:host].split(",", -1) if 
iopts[:host]
-                               raise PG::ConnectionBad, "could not match 
#{ihosts.size} host names to #{ihostaddrs.size} hostaddr values" if ihosts && 
ihosts.size != ihostaddrs.size
 
-                               iports = iopts[:port].split(",", -1)
-                               iports = iports * ihostaddrs.size if 
iports.size == 1
-                               raise PG::ConnectionBad, "could not match 
#{iports.size} port numbers to #{ihostaddrs.size} hosts" if iports.size != 
ihostaddrs.size
-
-                               # Try to connect to each hostaddr with separate 
timeout
-                               ihostaddrs.each_with_index do |ihostaddr, idx|
-                                       oopts = iopts.merge(hostaddr: 
ihostaddr, port: iports[idx])
-                                       oopts[:host] = ihosts[idx] if ihosts
-                                       c = connect_internal(oopts, errors)
-                                       return c if c
-                               end
-                       elsif iopts[:host] && !iopts[:host].empty?
-                               # Resolve DNS in Ruby to avoid blocking state 
while connecting, when it ...
+                       elsif iopts[:host] && !iopts[:host].empty? && 
PG.library_version >= 100000
+                               # Resolve DNS in Ruby to avoid blocking state 
while connecting.
+                               # Multiple comma-separated values are 
generated, if the hostname resolves to both IPv4 and IPv6 addresses.
+                               # This requires PostgreSQL-10+, so no DNS 
resolving is done on earlier versions.
                                ihosts = iopts[:host].split(",", -1)
-
                                iports = iopts[:port].split(",", -1)
                                iports = iports * ihosts.size if iports.size == 
1
                                raise PG::ConnectionBad, "could not match 
#{iports.size} port numbers to #{ihosts.size} hosts" if iports.size != 
ihosts.size
 
-                               ihosts.each_with_index do |mhost, idx|
+                               dests = ihosts.each_with_index.flat_map do 
|mhost, idx|
                                        unless host_is_named_pipe?(mhost)
-                                               addrs = if 
Fiber.respond_to?(:scheduler) &&
+                                               if 
Fiber.respond_to?(:scheduler) &&
                                                                        
Fiber.scheduler &&
                                                                        
RUBY_VERSION < '3.1.'
 
                                                        # Use a second thread 
to avoid blocking of the scheduler.
                                                        # 
`TCPSocket.gethostbyname` isn't fiber aware before ruby-3.1.
-                                                       Thread.new{ 
Addrinfo.getaddrinfo(mhost, nil, nil, :STREAM).map(&:ip_address) rescue [''] 
}.value
+                                                       hostaddrs = Thread.new{ 
Addrinfo.getaddrinfo(mhost, nil, nil, :STREAM).map(&:ip_address) rescue [''] 
}.value
                                                else
-                                                       
Addrinfo.getaddrinfo(mhost, nil, nil, :STREAM).map(&:ip_address) rescue ['']
-                                               end
-
-                                               # Try to connect to each host 
with separate timeout
-                                               addrs.each do |addr|
-                                                       oopts = 
iopts.merge(hostaddr: addr, host: mhost, port: iports[idx])
-                                                       c = 
connect_internal(oopts, errors)
-                                                       return c if c
+                                                       hostaddrs = 
Addrinfo.getaddrinfo(mhost, nil, nil, :STREAM).map(&:ip_address) rescue ['']
                                                end
                                        else
                                                # No hostname to resolve 
(UnixSocket)
-                                               oopts = iopts.merge(host: 
mhost, port: iports[idx])
-                                               c = connect_internal(oopts, 
errors)
-                                               return c if c
+                                               hostaddrs = [nil]
                                        end
+                                       hostaddrs.map { |hostaddr| [hostaddr, 
mhost, iports[idx]] }
                                end
+                               iopts.merge!(
+                                       hostaddr: dests.map{|d| d[0] 
}.join(","),
+                                       host: dests.map{|d| d[1] }.join(","),
+                                       port: dests.map{|d| d[2] }.join(","))
                        else
                                # No host given
-                               return connect_internal(iopts)
                        end
-                       raise PG::ConnectionBad, errors.join("\n")
-               end
-
-               private def connect_internal(opts, errors=nil)
-                       begin
-                               conn = self.connect_start(opts) or
-                                                                               
        raise(PG::Error, "Unable to create a new connection")
+                       conn = self.connect_start(iopts) or
+                                                                               
raise(PG::Error, "Unable to create a new connection")
 
-                               raise PG::ConnectionBad.new(conn.error_message, 
connection: self) if conn.status == PG::CONNECTION_BAD
+                       raise PG::ConnectionBad, conn.error_message if 
conn.status == PG::CONNECTION_BAD
 
-                               conn.send(:async_connect_or_reset, 
:connect_poll)
-                       rescue PG::ConnectionBad => err
-                               if errors && !(conn && 
[PG::CONNECTION_AWAITING_RESPONSE].include?(conn.instance_variable_get(:@last_status)))
-                                       # Seems to be no authentication error 
-> try next host
-                                       errors << err
-                                       return nil
-                               else
-                                       # Probably an authentication error
-                                       raise
-                               end
-                       end
+                       conn.send(:async_connect_or_reset, :connect_poll)
                        conn
                end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pg/version.rb new/lib/pg/version.rb
--- old/lib/pg/version.rb       2022-08-09 16:42:03.000000000 +0200
+++ new/lib/pg/version.rb       2022-10-11 13:30:28.000000000 +0200
@@ -1,4 +1,4 @@
 module PG
        # Library version
-       VERSION = '1.4.3'
+       VERSION = '1.4.4'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-08-09 16:42:03.000000000 +0200
+++ new/metadata        2022-10-11 13:30:28.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: pg
 version: !ruby/object:Gem::Version
-  version: 1.4.3
+  version: 1.4.4
 platform: ruby
 authors:
 - Michael Granger
@@ -11,32 +11,26 @@
 cert_chain:
 - |
   -----BEGIN CERTIFICATE-----
-  MIIETTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
-  L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yMjAyMTQxMzMwNTZaFw0yMzAy
-  MTQxMzMwNTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
-  PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
-  mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
-  eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
-  8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
-  SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
-  JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
-  eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
-  chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
-  9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjgYEwfzAJ
-  BgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUOIdbSMr3VFrTCO9/cTM0
-  0exHzBcwIgYDVR0RBBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwIgYDVR0S
-  BBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwDQYJKoZIhvcNAQELBQADggGB
-  AFWP7F/y3Oq3NgrqUOnjKOeDaBa7AqNhHS+PZg+C90lnJzMgOs4KKgZYxqSQVSab
-  SCEmzIO/StkXY4NpJ4fYLrHemf/fJy1wPyu+fNdp5SEEUwEo+2toRFlzTe4u4LdS
-  QC636nPPTMt8H3xz2wf/lUIUeo2Qc95Qt2BQM465ibbG9kmA3c7Sopx6yOabYOAl
-  KPRbOSEPiWYcF9Suuz8Gdf8jxEtPlnZiwRvnYJ+IHMq3XQCJWPpMzdDMbtlgHbXE
-  vq1zOTLMSYAS0UB3uionR4yo1hLz60odwkCm7qf0o2Ci/5OjtB0a89VuyqRU2vUJ
-  QH95WBjDJ6lCCW7J0mrMPnJQSUFTmufsU6jOChvPaCeAzW1YwrsP/YKnvwueG7ip
-  VOdW6RitjtFxhS7evRL0201+KUvLz12zZWWjOcujlQs64QprxOtiv/MiisKb1Ng+
-  oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
-  nA==
+  MIIDLjCCAhagAwIBAgIBCjANBgkqhkiG9w0BAQsFADA9MQ4wDAYDVQQDDAVrYW5p
+  czEXMBUGCgmSJomT8ixkARkWB2NvbWNhcmQxEjAQBgoJkiaJk/IsZAEZFgJkZTAe
+  Fw0yMjA0MTExMTMwNTNaFw0yMzA0MTExMTMwNTNaMD0xDjAMBgNVBAMMBWthbmlz
+  MRcwFQYKCZImiZPyLGQBGRYHY29tY2FyZDESMBAGCgmSJomT8ixkARkWAmRlMIIB
+  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApop+rNmg35bzRugZ21VMGqI6
+  HGzPLO4VHYncWn/xmgPU/ZMcZdfj6MzIaZJ/czXyt4eHpBk1r8QOV3gBXnRXEjVW
+  9xi+EdVOkTV2/AVFKThcbTAQGiF/bT1n2M+B1GTybRzMg6hyhOJeGPqIhLfJEpxn
+  lJi4+ENAVT4MpqHEAGB8yFoPC0GqiOHQsdHxQV3P3c2OZqG+yJey74QtwA2tLcLn
+  Q53c63+VLGsOjODl1yPn/2ejyq8qWu6ahfTxiIlSar2UbwtaQGBDFdb2CXgEufXT
+  L7oaPxlmj+Q2oLOfOnInd2Oxop59HoJCQPsg8f921J43NCQGA8VHK6paxIRDLQID
+  AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUvgTdT7fe
+  x17ugO3IOsjEJwW7KP4wDQYJKoZIhvcNAQELBQADggEBAILiaB/unSVBfX5n7uL8
+  veGGCOHuGYhCGqspb6mYiCx0dmV3RPRiEfGDLfzcXbHNx/3AjygcxH4Slr+pmaxr
+  04Xli3WurocnjoANSWqCwpHH3OhSVxFgBNrCa3OMWcIr0xKH+I7PXA80SXe0pzfg
+  ePjpzTY71j+rcyRJqWiU5/zwdUaCCelBJscxh/0IaNcz67ocCEMRj0n4m5HFEmZL
+  9zKkMZFoOjxRQjcL84QU7ZXnnFR5HG8nLw+NqWjo49W6MBQ9HGFda2tk3OpBhyWS
+  sc3NyOkGUGdfiee5VRG31Sh3LLON3YGED+zZAS+ZF6598y4vhv8MBLa1Oy357byC
+  tTg=
   -----END CERTIFICATE-----
-date: 2022-08-09 00:00:00.000000000 Z
+date: 2022-10-11 00:00:00.000000000 Z
 dependencies: []
 description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with 
PostgreSQL
   9.3 and later.
@@ -179,7 +173,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.3.7
+rubygems_version: 3.3.19
 signing_key: 
 specification_version: 4
 summary: Pg is the Ruby interface to the PostgreSQL RDBMS
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ

Reply via email to