pg 1.3.0 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 651abffa980cbaef37ccb16afb4a6f107bf35d0314c2838b27d09ae88848dda7
4
- data.tar.gz: 6910361844ff87e9885d21cd62e5f43522296c08396d8eb6bb8487ba452f2946
3
+ metadata.gz: 0bb3782224d0c471417ceaa47d1355d5a06be2590fb3671fde73882346db0c5c
4
+ data.tar.gz: cd728b238d0b174f02a31c38afbd990177f81eec8516a1c953ee7bade1ddb4c6
5
5
  SHA512:
6
- metadata.gz: 413b2ac42d264829d2985a9818ba79be9e67cbd3a5a8b4cbe42007dbca27e53917d6360ae4d03285470c21295d9f651e9d478bbe06491c43d6b015338c6b0d0d
7
- data.tar.gz: 45ce1ad11dcb614018a6da4fa0b3d1f45b0be267922f7d803fc46bed9150aee6443ccacfdd6d70de1718fa8a6db1919de5498e9b544d8f194e8301d386e0ee07
6
+ metadata.gz: d7b3ad8293281fb830274dc0e3d6e3c59c1dca85ea4f112f0aaf3a7629f61e315747f1e6ecad96e7a9528d42eeb3baafb819b7360d02acfc636ae7cb2d24ef42
7
+ data.tar.gz: f2476f2c7b1950346adf87c3675b838b9c57c909d6d787b50f4cf418ccb51296a02677faac7910378a665daa087f2aa552375f72ca42ba428e539cf07e80392c
checksums.yaml.gz.sig CHANGED
Binary file
data/.appveyor.yml CHANGED
@@ -29,7 +29,7 @@ environment:
29
29
  matrix:
30
30
  - ruby_version: "head"
31
31
  RUBYDOWNLOAD: x86
32
- PGVERSION: 10.16-1-windows
32
+ PGVERSION: 10.20-1-windows
33
33
  PGVER: 10
34
34
  - ruby_version: "25"
35
35
  PGVERSION: 9.3.25-1-windows
@@ -45,10 +45,10 @@ jobs:
45
45
  include:
46
46
  - ruby: "3.1"
47
47
  platform: "x64-mingw-ucrt"
48
- PGVERSION: 14.0-1-windows-x64
48
+ PGVERSION: 14.2-1-windows-x64
49
49
  - ruby: "2.5"
50
50
  platform: "x64-mingw32"
51
- PGVERSION: 10.16-1-windows
51
+ PGVERSION: 10.20-1-windows
52
52
 
53
53
  runs-on: windows-latest
54
54
  env:
@@ -56,7 +56,7 @@ jobs:
56
56
  steps:
57
57
  - uses: actions/checkout@v2
58
58
  - name: Set up Ruby
59
- uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
59
+ uses: ruby/setup-ruby@v1
60
60
  with:
61
61
  ruby-version: ${{ matrix.ruby }}
62
62
 
@@ -31,12 +31,12 @@ jobs:
31
31
  include:
32
32
  - os: windows
33
33
  ruby: "head"
34
- PGVERSION: 14.1-1-windows-x64
34
+ PGVERSION: 14.2-1-windows-x64
35
35
  PGVER: "14"
36
36
  - os: windows
37
37
  ruby: "2.5"
38
- PGVERSION: 9.3.25-1-windows-x64
39
- PGVER: "9.3"
38
+ PGVERSION: 9.4.26-1-windows-x64
39
+ PGVER: "9.4"
40
40
  - os: ubuntu
41
41
  ruby: "head"
42
42
  PGVER: "14"
@@ -54,7 +54,7 @@ jobs:
54
54
  PGVER: "14"
55
55
  - os: macos
56
56
  ruby: "head"
57
- PGVERSION: 14.1-1-osx
57
+ PGVERSION: 14.2-1-osx
58
58
  PGVER: "14"
59
59
 
60
60
  runs-on: ${{ matrix.os }}-latest
@@ -65,7 +65,7 @@ jobs:
65
65
  steps:
66
66
  - uses: actions/checkout@v2
67
67
  - name: Set up Ruby
68
- uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
68
+ uses: ruby/setup-ruby@v1
69
69
  with:
70
70
  ruby-version: ${{ matrix.ruby }}
71
71
 
@@ -116,7 +116,6 @@ jobs:
116
116
  - run: gem install --local *.gem --verbose
117
117
 
118
118
  - name: Run specs
119
- continue-on-error: ${{ matrix.ruby == 'truffleruby-head' }}
120
119
  env:
121
120
  PG_DEBUG: 0
122
121
  run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc
data/History.rdoc CHANGED
@@ -1,3 +1,75 @@
1
+ == v1.3.5 [2022-03-31] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ Bugfixes:
4
+
5
+ - Handle PGRES_COMMAND_OK in pgresult_stream_any. #447
6
+ Fixes usage when trying to stream the result of a procedure call that returns no results.
7
+
8
+ Enhancements:
9
+
10
+ - Rename BasicTypeRegistry#define_default_types to #register_default_types to use a more consistent terminology.
11
+ Keeping define_default_types for compatibility.
12
+ - BasicTypeRegistry: return self instead of objects by accident.
13
+ This allows call chaining.
14
+ - Add some April fun. #449
15
+
16
+ Documentation:
17
+ - Refine documentation of conn.socket_io and conn.connect_poll
18
+
19
+
20
+ == v1.3.4 [2022-03-10] Lars Kanis <lars@greiz-reinsdorf.de>
21
+
22
+ Bugfixes:
23
+
24
+ - Don't leak IO in case of connection errors. #439
25
+ Previously it was kept open until the PG::Connection was garbage collected.
26
+ - Fix a performance regession in conn.get_result noticed in single row mode. #442
27
+ - Fix occasional error Errno::EBADF (Bad file descriptor) while connecting. #444
28
+ - Fix compatibility of res.stream_each* methods with Fiber.scheduler. #446
29
+ - Remove FL_TEST and FL_SET, which are MRI-internal. #437
30
+
31
+ Enhancements:
32
+
33
+ - Allow pgresult_stream_any to be used by sequel_pg. #443
34
+
35
+
36
+ == v1.3.3 [2022-02-22] Lars Kanis <lars@greiz-reinsdorf.de>
37
+
38
+ Bugfixes:
39
+
40
+ - Fix omission of the third digit of IPv4 addresses in connection URI. #435
41
+ - Fix wrong permission of certs/larskanis-2022.pem in the pg-1.3.2.gem. #432
42
+
43
+
44
+ == v1.3.2 [2022-02-14] Lars Kanis <lars@greiz-reinsdorf.de>
45
+
46
+ Bugfixes:
47
+
48
+ - Cancel only active query after failing transaction. #430
49
+ This avoids an incompatibility with pgbouncer since pg-1.3.0.
50
+ - Fix String objects with non-applied encoding when using COPY or record decoders. #427
51
+ - Update Windows fat binary gem to PostgreSQL-14.2.
52
+
53
+ Enhancements:
54
+
55
+ - Improve extconf.rb checks to reduces the number of compiler calls.
56
+ - Add a check for PGRES_PIPELINE_SYNC, to make sure the library version and the header files are PostgreSQL-14+. #429
57
+
58
+
59
+ == v1.3.1 [2022-02-01] Michael Granger <ged@FaerieMUD.org>
60
+
61
+ Bugfixes:
62
+
63
+ - Fix wrong handling of socket writability on Windows introduced in #417.
64
+ This caused starvation in conn.put_copy_data.
65
+ - Fix error in PG.version_string(true). #419
66
+ - Fix a regression in pg 1.3.0 where Ruby 2.x busy-looping any fractional seconds for every wait. #420
67
+
68
+ Enhancements:
69
+
70
+ - Raise an error when conn.copy_data is used in nonblocking mode.
71
+
72
+
1
73
  == v1.3.0 [2022-01-20] Michael Granger <ged@FaerieMUD.org>
2
74
 
3
75
  Install Enhancements:
@@ -26,7 +98,7 @@ API Enhancements:
26
98
  - Run Connection.ping in a second thread.
27
99
  - Make discard_results scheduler friendly
28
100
  - Do all socket waiting through the conn.socket_io object.
29
- - Avoid PG.connect blocking while address resolution by automatically providing the +hostaddr+ parameter.
101
+ - Avoid PG.connect blocking while address resolution by automatically providing the +hostaddr+ parameter and resolving in Ruby instead of libpq.
30
102
  - On Windows Fiber.scheduler support requires Ruby-3.1+.
31
103
  It is also only partly usable since may ruby IO methods are not yet scheduler aware on Windows.
32
104
  - Add support for pipeline mode of PostgreSQL-14. #401
@@ -65,6 +137,7 @@ Deprecated:
65
137
  Removed:
66
138
  - Remove support of ruby-2.2, 2.3 and 2.4. Minimum is ruby-2.5 now.
67
139
  - Remove support for PostgreSQL-9.2. Minimum is PostgreSQL-9.3 now.
140
+ - Remove constant PG::REVISION, which was broken since pg-1.1.4.
68
141
 
69
142
  Repository:
70
143
  - Replace Hoe by Bundler for gem packaging
data/Rakefile.cross CHANGED
@@ -7,6 +7,7 @@ require 'rake/clean'
7
7
  require 'rake/extensiontask'
8
8
  require 'rake/extensioncompiler'
9
9
  require 'ostruct'
10
+ require_relative 'rakelib/task_extension'
10
11
 
11
12
  MISCDIR = BASEDIR + 'misc'
12
13
 
@@ -20,6 +21,7 @@ end
20
21
 
21
22
  class CrossLibrary < OpenStruct
22
23
  include Rake::DSL
24
+ prepend TaskExtension
23
25
 
24
26
  def initialize(for_platform, openssl_config, toolchain)
25
27
  super()
@@ -30,7 +32,7 @@ class CrossLibrary < OpenStruct
30
32
 
31
33
  # Cross-compilation constants
32
34
  self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1m'
33
- self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.1'
35
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.2'
34
36
 
35
37
  # Check if symlinks work in the current working directory.
36
38
  # This fails, if rake-compiler-dock is running on a Windows box.
@@ -0,0 +1,26 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIETTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
3
+ L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yMjAyMTQxMzMwNTZaFw0yMzAy
4
+ MTQxMzMwNTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
5
+ PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
6
+ mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
7
+ eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
8
+ 8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
9
+ SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
10
+ JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
11
+ eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
12
+ chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
13
+ 9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjgYEwfzAJ
14
+ BgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUOIdbSMr3VFrTCO9/cTM0
15
+ 0exHzBcwIgYDVR0RBBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwIgYDVR0S
16
+ BBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwDQYJKoZIhvcNAQELBQADggGB
17
+ AFWP7F/y3Oq3NgrqUOnjKOeDaBa7AqNhHS+PZg+C90lnJzMgOs4KKgZYxqSQVSab
18
+ SCEmzIO/StkXY4NpJ4fYLrHemf/fJy1wPyu+fNdp5SEEUwEo+2toRFlzTe4u4LdS
19
+ QC636nPPTMt8H3xz2wf/lUIUeo2Qc95Qt2BQM465ibbG9kmA3c7Sopx6yOabYOAl
20
+ KPRbOSEPiWYcF9Suuz8Gdf8jxEtPlnZiwRvnYJ+IHMq3XQCJWPpMzdDMbtlgHbXE
21
+ vq1zOTLMSYAS0UB3uionR4yo1hLz60odwkCm7qf0o2Ci/5OjtB0a89VuyqRU2vUJ
22
+ QH95WBjDJ6lCCW7J0mrMPnJQSUFTmufsU6jOChvPaCeAzW1YwrsP/YKnvwueG7ip
23
+ VOdW6RitjtFxhS7evRL0201+KUvLz12zZWWjOcujlQs64QprxOtiv/MiisKb1Ng+
24
+ oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
25
+ nA==
26
+ -----END CERTIFICATE-----
data/ext/errorcodes.rb CHANGED
File without changes
data/ext/extconf.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require 'pp'
2
4
  require 'mkmf'
3
5
 
@@ -37,12 +39,12 @@ else
37
39
 
38
40
  if pgconfig && pgconfig != 'ignore'
39
41
  $stderr.puts "Using config values from %s" % [ pgconfig ]
40
- incdir = `"#{pgconfig}" --includedir`.chomp
41
- libdir = `"#{pgconfig}" --libdir`.chomp
42
+ incdir = IO.popen([pgconfig, "--includedir"], &:read).chomp
43
+ libdir = IO.popen([pgconfig, "--libdir"], &:read).chomp
42
44
  dir_config 'pg', incdir, libdir
43
45
 
44
46
  # Windows traditionally stores DLLs beside executables, not in libdir
45
- dlldir = RUBY_PLATFORM=~/mingw|mswin/ ? `"#{pgconfig}" --bindir`.chomp : libdir
47
+ dlldir = RUBY_PLATFORM=~/mingw|mswin/ ? IO.popen([pgconfig, "--bindir"], &:read).chomp : libdir
46
48
 
47
49
  elsif checking_for "libpq per pkg-config" do
48
50
  _cflags, ldflags, _libs = pkg_config("libpq")
@@ -87,7 +89,7 @@ begin
87
89
  have_library( 'libpq', 'PQconnectdb', ['libpq-fe.h'] ) ||
88
90
  have_library( 'ms/libpq', 'PQconnectdb', ['libpq-fe.h'] )
89
91
 
90
- rescue SystemExit => err
92
+ rescue SystemExit
91
93
  install_text = case RUBY_PLATFORM
92
94
  when /linux/
93
95
  <<-EOT
@@ -138,15 +140,18 @@ if /mingw/ =~ RUBY_PLATFORM && RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
138
140
  end
139
141
  end
140
142
 
141
- have_func 'PQconninfo' or
143
+ have_func 'PQconninfo', 'libpq-fe.h' or
142
144
  abort "Your PostgreSQL is too old. Either install an older version " +
143
145
  "of this gem or upgrade your database to at least PostgreSQL-9.3."
144
146
  # optional headers/functions
145
- have_func 'PQsslAttribute' # since PostgreSQL-9.5
146
- have_func 'PQresultVerboseErrorMessage' # since PostgreSQL-9.6
147
- have_func 'PQencryptPasswordConn' # since PostgreSQL-10
148
- have_func 'PQresultMemorySize' # since PostgreSQL-12
149
- have_func 'PQenterPipelineMode' # since PostgreSQL-14
147
+ have_func 'PQsslAttribute', 'libpq-fe.h' # since PostgreSQL-9.5
148
+ have_func 'PQresultVerboseErrorMessage', 'libpq-fe.h' # since PostgreSQL-9.6
149
+ have_func 'PQencryptPasswordConn', 'libpq-fe.h' # since PostgreSQL-10
150
+ have_func 'PQresultMemorySize', 'libpq-fe.h' # since PostgreSQL-12
151
+ have_func 'PQenterPipelineMode', 'libpq-fe.h' do |src| # since PostgreSQL-14
152
+ # Ensure header files fit as well
153
+ src + " int con(){ return PGRES_PIPELINE_SYNC; }"
154
+ end
150
155
  have_func 'timegm'
151
156
  have_func 'rb_gc_adjust_memory_usage' # since ruby-2.4
152
157
  have_func 'rb_gc_mark_movable' # since ruby-2.7
@@ -164,3 +169,32 @@ end
164
169
  create_header()
165
170
  create_makefile( "pg_ext" )
166
171
 
172
+
173
+ def message!(important_message)
174
+ message important_message
175
+ if !$stdout.tty? && File.chardev?('/dev/tty')
176
+ File.open('/dev/tty', 'w') do |tty|
177
+ tty.print important_message
178
+ end
179
+ end
180
+ rescue
181
+ end
182
+
183
+ if "2022-04-01" == Time.now.strftime("%Y-%m-%d")
184
+ message! <<-EOM
185
+ ===================================================================
186
+ HEADS UP! Prepare for pg-1.4.2022 ! 🎉🎉🎉
187
+
188
+ Now that psycopg3 has most of the features of ruby-pg, we plan to
189
+ switch to using it as our foundation for the next pg release.
190
+ It will run through pycall and requires a working python setup.
191
+ This will minimize our development and maintenance efforts, since
192
+ it allows us to use one and the same code base for both programming
193
+ languages - ruby and python. 👏😃
194
+
195
+ And we follow the recent merge of the Django and Rails teams! ❤️
196
+
197
+ Stay up-to-date at https://github.com/ged/ruby-pg/issues/449
198
+ ===================================================================
199
+ EOM
200
+ end
data/ext/pg.h CHANGED
@@ -344,6 +344,7 @@ void pg_typemap_compact _(( void * ));
344
344
 
345
345
  PGconn *pg_get_pgconn _(( VALUE ));
346
346
  t_pg_connection *pg_get_connection _(( VALUE ));
347
+ VALUE pgconn_block _(( int, VALUE *, VALUE ));
347
348
 
348
349
  VALUE pg_new_result _(( PGresult *, VALUE ));
349
350
  VALUE pg_new_result_autoclear _(( PGresult *, VALUE ));
data/ext/pg_connection.c CHANGED
@@ -450,17 +450,18 @@ pgconn_s_encrypt_password(VALUE self, VALUE password, VALUE username)
450
450
  * the asynchronous connection is ready
451
451
  *
452
452
  * Example:
453
- * conn = PG::Connection.connect_start("dbname=mydatabase")
454
- * socket = conn.socket_io
453
+ * require "io/wait"
454
+ *
455
+ * conn = PG::Connection.connect_start(dbname: 'mydatabase')
455
456
  * status = conn.connect_poll
456
457
  * while(status != PG::PGRES_POLLING_OK) do
457
458
  * # do some work while waiting for the connection to complete
458
459
  * if(status == PG::PGRES_POLLING_READING)
459
- * if(not select([socket], [], [], 10.0))
460
+ * unless conn.socket_io.wait_readable(10.0)
460
461
  * raise "Asynchronous connection timed out!"
461
462
  * end
462
463
  * elsif(status == PG::PGRES_POLLING_WRITING)
463
- * if(not select([], [socket], [], 10.0))
464
+ * unless conn.socket_io.wait_writable(10.0)
464
465
  * raise "Asynchronous connection timed out!"
465
466
  * end
466
467
  * end
@@ -475,9 +476,7 @@ pgconn_connect_poll(VALUE self)
475
476
  PostgresPollingStatusType status;
476
477
  status = gvl_PQconnectPoll(pg_get_pgconn(self));
477
478
 
478
- if ( status == PGRES_POLLING_FAILED ) {
479
- pgconn_close_socket_io(self);
480
- }
479
+ pgconn_close_socket_io(self);
481
480
 
482
481
  return INT2FIX((int)status);
483
482
  }
@@ -556,9 +555,7 @@ pgconn_reset_poll(VALUE self)
556
555
  PostgresPollingStatusType status;
557
556
  status = gvl_PQresetPoll(pg_get_pgconn(self));
558
557
 
559
- if ( status == PGRES_POLLING_FAILED ) {
560
- pgconn_close_socket_io(self);
561
- }
558
+ pgconn_close_socket_io(self);
562
559
 
563
560
  return INT2FIX((int)status);
564
561
  }
@@ -822,13 +819,15 @@ pgconn_socket(VALUE self)
822
819
  * call-seq:
823
820
  * conn.socket_io() -> IO
824
821
  *
825
- * Fetch a memorized IO object created from the Connection's underlying socket.
826
- * This object can be used for IO.select to wait for events while running
827
- * asynchronous API calls.
822
+ * Fetch an IO object created from the Connection's underlying socket.
823
+ * This object can be used per <tt>socket_io.wait_readable</tt>, <tt>socket_io.wait_writable</tt> or for <tt>IO.select</tt> to wait for events while running asynchronous API calls.
824
+ * <tt>IO#wait_*able</tt> is is <tt>Fiber.scheduler</tt> compatible in contrast to <tt>IO.select</tt>.
825
+ *
826
+ * The IO object can change while the connection is established, but is memorized afterwards.
827
+ * So be sure not to cache the IO object, but repeat calling <tt>conn.socket_io</tt> instead.
828
828
  *
829
- * Using this instead of #socket avoids the problem of the underlying connection
830
- * being closed by Ruby when an IO created using <tt>IO.for_fd(conn.socket)</tt>
831
- * goes out of scope. In contrast to #socket, it also works on Windows.
829
+ * Using this method also works on Windows in contrast to using #socket .
830
+ * It also avoids the problem of the underlying connection being closed by Ruby when an IO created using <tt>IO.for_fd(conn.socket)</tt> goes out of scope.
832
831
  */
833
832
  static VALUE
834
833
  pgconn_socket_io(VALUE self)
@@ -2241,19 +2240,15 @@ pg_rb_thread_io_wait(VALUE io, VALUE events, VALUE timeout) {
2241
2240
  GetOpenFile((io), fptr);
2242
2241
  if( !NIL_P(timeout) ){
2243
2242
  ptimeout.tv_sec = (time_t)(NUM2DBL(timeout));
2244
- ptimeout.tv_usec = (time_t)(NUM2DBL(timeout) - (double)ptimeout.tv_sec);
2243
+ ptimeout.tv_usec = (time_t)((NUM2DBL(timeout) - (double)ptimeout.tv_sec) * 1e6);
2245
2244
 
2246
2245
  gettimeofday(&currtime, NULL);
2247
2246
  timeradd(&currtime, &ptimeout, &aborttime);
2248
2247
  }
2249
2248
 
2250
- if(rb_events & PG_RUBY_IO_READABLE) {
2251
- w32_events |= FD_READ | FD_ACCEPT | FD_CLOSE;
2252
- } else if(rb_events & PG_RUBY_IO_WRITABLE) {
2253
- w32_events |= FD_WRITE | FD_CONNECT;
2254
- } else if(rb_events & PG_RUBY_IO_PRIORITY) {
2255
- w32_events |= FD_OOB;
2256
- }
2249
+ if(rb_events & PG_RUBY_IO_READABLE) w32_events |= FD_READ | FD_ACCEPT | FD_CLOSE;
2250
+ if(rb_events & PG_RUBY_IO_WRITABLE) w32_events |= FD_WRITE | FD_CONNECT;
2251
+ if(rb_events & PG_RUBY_IO_PRIORITY) w32_events |= FD_OOB;
2257
2252
 
2258
2253
  for(;;) {
2259
2254
  if ( WSAEventSelect(_get_osfhandle(fptr->fd), hEvent, w32_events) == SOCKET_ERROR ) {
@@ -2336,7 +2331,7 @@ pg_rb_io_wait(VALUE io, VALUE events, VALUE timeout) {
2336
2331
  GetOpenFile((io), fptr);
2337
2332
  if( !NIL_P(timeout) ){
2338
2333
  waittime.tv_sec = (time_t)(NUM2DBL(timeout));
2339
- waittime.tv_usec = (time_t)(NUM2DBL(timeout) - (double)waittime.tv_sec);
2334
+ waittime.tv_usec = (time_t)((NUM2DBL(timeout) - (double)waittime.tv_sec) * 1e6);
2340
2335
  }
2341
2336
  res = rb_wait_for_single_fd(fptr->fd, NUM2UINT(events), NIL_P(timeout) ? NULL : &waittime);
2342
2337
 
@@ -2347,21 +2342,12 @@ pg_rb_io_wait(VALUE io, VALUE events, VALUE timeout) {
2347
2342
  static void *
2348
2343
  wait_socket_readable( VALUE self, struct timeval *ptimeout, void *(*is_readable)(PGconn *))
2349
2344
  {
2350
- VALUE socket_io;
2351
2345
  VALUE ret;
2352
2346
  void *retval;
2353
2347
  struct timeval aborttime={0,0}, currtime, waittime;
2354
2348
  VALUE wait_timeout = Qnil;
2355
2349
  PGconn *conn = pg_get_pgconn(self);
2356
2350
 
2357
- socket_io = pgconn_socket_io(self);
2358
-
2359
- /* Check for connection errors (PQisBusy is true on connection errors) */
2360
- if ( PQconsumeInput(conn) == 0 ) {
2361
- pgconn_close_socket_io(self);
2362
- rb_raise( rb_eConnectionBad, "PQconsumeInput() %s", PQerrorMessage(conn) );
2363
- }
2364
-
2365
2351
  if ( ptimeout ) {
2366
2352
  gettimeofday(&currtime, NULL);
2367
2353
  timeradd(&currtime, ptimeout, &aborttime);
@@ -2376,6 +2362,7 @@ wait_socket_readable( VALUE self, struct timeval *ptimeout, void *(*is_readable)
2376
2362
 
2377
2363
  /* Is the given timeout valid? */
2378
2364
  if( !ptimeout || (waittime.tv_sec >= 0 && waittime.tv_usec >= 0) ){
2365
+ VALUE socket_io = pgconn_socket_io(self);
2379
2366
  /* Wait for the socket to become readable before checking again */
2380
2367
  ret = pg_rb_io_wait(socket_io, RB_INT2NUM(PG_RUBY_IO_READABLE), wait_timeout);
2381
2368
  } else {
@@ -2988,7 +2975,7 @@ get_result_readable(PGconn *conn)
2988
2975
  * If +true+ is returned, +conn.is_busy+ will return +false+
2989
2976
  * and +conn.get_result+ will not block.
2990
2977
  */
2991
- static VALUE
2978
+ VALUE
2992
2979
  pgconn_block( int argc, VALUE *argv, VALUE self ) {
2993
2980
  struct timeval timeout;
2994
2981
  struct timeval *ptimeout = NULL;
@@ -3076,7 +3063,8 @@ pgconn_async_get_last_result(VALUE self)
3076
3063
  for(;;) {
3077
3064
  int status;
3078
3065
 
3079
- pgconn_block( 0, NULL, self ); /* wait for input (without blocking) before reading the last result */
3066
+ /* wait for input (without blocking) before reading each result */
3067
+ wait_socket_readable(self, NULL, get_result_readable);
3080
3068
 
3081
3069
  cur = gvl_PQgetResult(conn);
3082
3070
  if (cur == NULL)
@@ -344,10 +344,12 @@ record_isspace(char ch)
344
344
  * oids = conn.exec( "SELECT (NULL::complex).*" )
345
345
  * # Build a type map (PG::TypeMapByColumn) for decoding the "complex" type
346
346
  * dtm = PG::BasicTypeMapForResults.new(conn).build_column_map( oids )
347
- * # Register a record decoder for decoding our type "complex"
348
- * PG::BasicTypeRegistry.register_coder(PG::TextDecoder::Record.new(type_map: dtm, name: "complex"))
349
- * # Apply the basic type registry to all results retrieved from the server
350
- * conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn)
347
+ * # Build a type map and populate with basic types
348
+ * btr = PG::BasicTypeRegistry.new.register_default_types
349
+ * # Register a new record decoder for decoding our type "complex"
350
+ * btr.register_coder(PG::TextDecoder::Record.new(type_map: dtm, name: "complex"))
351
+ * # Apply our basic type registry to all results retrieved from the server
352
+ * conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn, registry: btr)
351
353
  * # Now queries decode the "complex" type (and many basic types) automatically
352
354
  * conn.exec("SELECT * FROM my_table").to_a
353
355
  * # => [{"v1"=>[2.0, 3.0], "v2"=>[4.0, 5.0]}, {"v1"=>[6.0, 7.0], "v2"=>[8.0, 9.0]}]
data/ext/pg_result.c CHANGED
@@ -1383,7 +1383,7 @@ pgresult_type_map_get(VALUE self)
1383
1383
 
1384
1384
 
1385
1385
  static void
1386
- yield_hash(VALUE self, int ntuples, int nfields)
1386
+ yield_hash(VALUE self, int ntuples, int nfields, void *data)
1387
1387
  {
1388
1388
  int tuple_num;
1389
1389
  t_pg_result *this = pgresult_get_this(self);
@@ -1397,7 +1397,7 @@ yield_hash(VALUE self, int ntuples, int nfields)
1397
1397
  }
1398
1398
 
1399
1399
  static void
1400
- yield_array(VALUE self, int ntuples, int nfields)
1400
+ yield_array(VALUE self, int ntuples, int nfields, void *data)
1401
1401
  {
1402
1402
  int row;
1403
1403
  t_pg_result *this = pgresult_get_this(self);
@@ -1417,7 +1417,7 @@ yield_array(VALUE self, int ntuples, int nfields)
1417
1417
  }
1418
1418
 
1419
1419
  static void
1420
- yield_tuple(VALUE self, int ntuples, int nfields)
1420
+ yield_tuple(VALUE self, int ntuples, int nfields, void *data)
1421
1421
  {
1422
1422
  int tuple_num;
1423
1423
  t_pg_result *this = pgresult_get_this(self);
@@ -1436,8 +1436,9 @@ yield_tuple(VALUE self, int ntuples, int nfields)
1436
1436
  }
1437
1437
  }
1438
1438
 
1439
- static VALUE
1440
- pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int))
1439
+ /* Non-static, and data pointer for use by sequel_pg */
1440
+ VALUE
1441
+ pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int, void*), void* data)
1441
1442
  {
1442
1443
  t_pg_result *this;
1443
1444
  int nfields;
@@ -1456,6 +1457,7 @@ pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int))
1456
1457
 
1457
1458
  switch( PQresultStatus(pgresult) ){
1458
1459
  case PGRES_TUPLES_OK:
1460
+ case PGRES_COMMAND_OK:
1459
1461
  if( ntuples == 0 )
1460
1462
  return self;
1461
1463
  rb_raise( rb_eInvalidResultStatus, "PG::Result is not in single row mode");
@@ -1465,7 +1467,12 @@ pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int))
1465
1467
  pg_result_check( self );
1466
1468
  }
1467
1469
 
1468
- yielder( self, ntuples, nfields );
1470
+ yielder( self, ntuples, nfields, data );
1471
+
1472
+ if( gvl_PQisBusy(pgconn) ){
1473
+ /* wait for input (without blocking) before reading each result */
1474
+ pgconn_block( 0, NULL, this->connection );
1475
+ }
1469
1476
 
1470
1477
  pgresult = gvl_PQgetResult(pgconn);
1471
1478
  if( pgresult == NULL )
@@ -1516,7 +1523,7 @@ pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int))
1516
1523
  static VALUE
1517
1524
  pgresult_stream_each(VALUE self)
1518
1525
  {
1519
- return pgresult_stream_any(self, yield_hash);
1526
+ return pgresult_stream_any(self, yield_hash, NULL);
1520
1527
  }
1521
1528
 
1522
1529
  /*
@@ -1532,7 +1539,7 @@ pgresult_stream_each(VALUE self)
1532
1539
  static VALUE
1533
1540
  pgresult_stream_each_row(VALUE self)
1534
1541
  {
1535
- return pgresult_stream_any(self, yield_array);
1542
+ return pgresult_stream_any(self, yield_array, NULL);
1536
1543
  }
1537
1544
 
1538
1545
  /*
@@ -1549,7 +1556,7 @@ pgresult_stream_each_tuple(VALUE self)
1549
1556
  /* allocate VALUEs that are shared between all streamed tuples */
1550
1557
  ensure_init_for_tuple(self);
1551
1558
 
1552
- return pgresult_stream_any(self, yield_tuple);
1559
+ return pgresult_stream_any(self, yield_tuple, NULL);
1553
1560
  }
1554
1561
 
1555
1562
  /*
data/ext/pg_tuple.c CHANGED
@@ -471,10 +471,7 @@ pg_tuple_dump(VALUE self)
471
471
  values = rb_ary_new4(this->num_fields, &this->values[0]);
472
472
  a = rb_ary_new3(2, field_names, values);
473
473
 
474
- if (FL_TEST(self, FL_EXIVAR)) {
475
- rb_copy_generic_ivar(a, self);
476
- FL_SET(a, FL_EXIVAR);
477
- }
474
+ rb_copy_generic_ivar(a, self);
478
475
 
479
476
  return a;
480
477
  }
@@ -542,10 +539,7 @@ pg_tuple_load(VALUE self, VALUE a)
542
539
 
543
540
  RTYPEDDATA_DATA(self) = this;
544
541
 
545
- if (FL_TEST(a, FL_EXIVAR)) {
546
- rb_copy_generic_ivar(self, a);
547
- FL_SET(self, FL_EXIVAR);
548
- }
542
+ rb_copy_generic_ivar(self, a);
549
543
 
550
544
  return self;
551
545
  }
@@ -76,6 +76,7 @@ pg_tmas_fit_to_copy_get( VALUE self )
76
76
  static VALUE
77
77
  pg_tmas_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, int format, int enc_idx )
78
78
  {
79
+ rb_str_modify(field_str);
79
80
  if( format == 0 ){
80
81
  PG_ENCODING_SET_NOCHECK( field_str, enc_idx );
81
82
  } else {
@@ -150,10 +150,12 @@ pg_tmbc_typecast_copy_get( t_typemap *p_typemap, VALUE field_str, int fieldno, i
150
150
 
151
151
  /* Is it a pure String conversion? Then we can directly send field_str to the user. */
152
152
  if( dec_func == pg_text_dec_string ){
153
+ rb_str_modify(field_str);
153
154
  PG_ENCODING_SET_NOCHECK( field_str, enc_idx );
154
155
  return field_str;
155
156
  }
156
157
  if( dec_func == pg_bin_dec_bytea ){
158
+ rb_str_modify(field_str);
157
159
  PG_ENCODING_SET_NOCHECK( field_str, rb_ascii8bit_encindex() );
158
160
  return field_str;
159
161
  }
@@ -22,7 +22,7 @@ require 'pg' unless defined?( PG )
22
22
  # end
23
23
  #
24
24
  # conn = PG.connect
25
- # regi = PG::BasicTypeRegistry.new.define_default_types
25
+ # regi = PG::BasicTypeRegistry.new.register_default_types
26
26
  # regi.register_type(0, 'inet', InetEncoder, InetDecoder)
27
27
  # conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn, registry: regi)
28
28
  class PG::BasicTypeRegistry
@@ -184,6 +184,7 @@ class PG::BasicTypeRegistry
184
184
  name = coder.name || raise(ArgumentError, "name of #{coder.inspect} must be defined")
185
185
  h[:encoder][name] = coder if coder.respond_to?(:encode)
186
186
  h[:decoder][name] = coder if coder.respond_to?(:decode)
187
+ self
187
188
  end
188
189
 
189
190
  # Register the given +encoder_class+ and/or +decoder_class+ for casting a PostgreSQL type.
@@ -193,6 +194,7 @@ class PG::BasicTypeRegistry
193
194
  def register_type(format, name, encoder_class, decoder_class)
194
195
  register_coder(encoder_class.new(name: name, format: format)) if encoder_class
195
196
  register_coder(decoder_class.new(name: name, format: format)) if decoder_class
197
+ self
196
198
  end
197
199
 
198
200
  # Alias the +old+ type to the +new+ type.
@@ -205,10 +207,11 @@ class PG::BasicTypeRegistry
205
207
  @coders_by_name[format][ende].delete(new)
206
208
  end
207
209
  end
210
+ self
208
211
  end
209
212
 
210
213
  # Populate the registry with all builtin types of ruby-pg
211
- def define_default_types
214
+ def register_default_types
212
215
  register_type 0, 'int2', PG::TextEncoder::Integer, PG::TextDecoder::Integer
213
216
  alias_type 0, 'int4', 'int2'
214
217
  alias_type 0, 'int8', 'int2'
@@ -281,8 +284,10 @@ class PG::BasicTypeRegistry
281
284
  self
282
285
  end
283
286
 
287
+ alias define_default_types register_default_types
288
+
284
289
  # @private
285
- DEFAULT_TYPE_REGISTRY = PG::BasicTypeRegistry.new.define_default_types
290
+ DEFAULT_TYPE_REGISTRY = PG::BasicTypeRegistry.new.register_default_types
286
291
 
287
292
  # Delegate class method calls to DEFAULT_TYPE_REGISTRY
288
293
  class << self
data/lib/pg/connection.rb CHANGED
@@ -105,7 +105,7 @@ class PG::Connection
105
105
  end
106
106
  # extract "host1,host2" from "host1:5432,host2:5432"
107
107
  iopts[:host] = uri_match['hostports'].split(',', -1).map do |hostport|
108
- hostmatch = HOST_AND_PORT.match(hostport)
108
+ hostmatch = /\A#{HOST_AND_PORT}\z/.match(hostport)
109
109
  hostmatch['IPv6address'] || hostmatch['IPv4address'] || hostmatch['reg-name']&.gsub(/%(\h\h)/){ $1.hex.chr }
110
110
  end.join(',')
111
111
  oopts = {}
@@ -241,6 +241,7 @@ class PG::Connection
241
241
  # ["more", "data", "to", "copy"]
242
242
 
243
243
  def copy_data( sql, coder=nil )
244
+ raise PG::NotInBlockingMode, "copy_data can not be used in nonblocking mode" if nonblocking?
244
245
  res = exec( sql )
245
246
 
246
247
  case res.result_status
@@ -312,7 +313,7 @@ class PG::Connection
312
313
  exec "BEGIN"
313
314
  res = yield(self)
314
315
  rescue Exception
315
- cancel if transaction_status != PG::PQTRANS_IDLE
316
+ cancel if transaction_status == PG::PQTRANS_ACTIVE
316
317
  block
317
318
  exec "ROLLBACK"
318
319
  raise
@@ -385,7 +386,7 @@ class PG::Connection
385
386
  # If the optional code block is given, it will be passed <i>result</i> as an argument,
386
387
  # and the PG::Result object will automatically be cleared when the block terminates.
387
388
  # In this instance, <code>conn.exec</code> returns the value of the block.
388
- def get_result(*args)
389
+ def get_result
389
390
  block
390
391
  sync_get_result
391
392
  end
@@ -611,9 +612,6 @@ class PG::Connection
611
612
  alias async_cancel cancel
612
613
 
613
614
  private def async_connect_or_reset(poll_meth)
614
- # Now grab a reference to the underlying socket so we know when the connection is established
615
- socket = socket_io
616
-
617
615
  # Track the progress of the connection, waiting for the socket to become readable/writable before polling it
618
616
  poll_status = PG::PGRES_POLLING_WRITING
619
617
  until poll_status == PG::PGRES_POLLING_OK ||
@@ -622,18 +620,22 @@ class PG::Connection
622
620
  # If the socket needs to read, wait 'til it becomes readable to poll again
623
621
  case poll_status
624
622
  when PG::PGRES_POLLING_READING
625
- socket.wait_readable
623
+ socket_io.wait_readable
626
624
 
627
625
  # ...and the same for when the socket needs to write
628
626
  when PG::PGRES_POLLING_WRITING
629
- socket.wait_writable
627
+ socket_io.wait_writable
630
628
  end
631
629
 
632
630
  # Check to see if it's finished or failed yet
633
631
  poll_status = send( poll_meth )
634
632
  end
635
633
 
636
- raise(PG::ConnectionBad, error_message) unless status == PG::CONNECTION_OK
634
+ unless status == PG::CONNECTION_OK
635
+ msg = error_message
636
+ finish
637
+ raise PG::ConnectionBad, msg
638
+ end
637
639
 
638
640
  # Set connection to nonblocking to handle all blocking states in ruby.
639
641
  # That way a fiber scheduler is able to handle IO requests.
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.3.0'
3
+ VERSION = '1.3.5'
4
4
  end
data/lib/pg.rb CHANGED
@@ -53,12 +53,14 @@ module PG
53
53
 
54
54
  class NotAllCopyDataRetrieved < PG::Error
55
55
  end
56
+ class NotInBlockingMode < PG::Error
57
+ end
56
58
 
57
- ### Get the PG library version. If +include_buildnum+ is +true+, include the build ID.
58
- def self::version_string( include_buildnum=false )
59
- vstring = "%s %s" % [ self.name, VERSION ]
60
- vstring << " (build %s)" % [ REVISION[/: ([[:xdigit:]]+)/, 1] || '0' ] if include_buildnum
61
- return vstring
59
+ # Get the PG library version.
60
+ #
61
+ # +include_buildnum+ is no longer used and any value passed will be ignored.
62
+ def self::version_string( include_buildnum=nil )
63
+ return "%s %s" % [ self.name, VERSION ]
62
64
  end
63
65
 
64
66
 
File without changes
@@ -0,0 +1,46 @@
1
+ # This source code is borrowed from:
2
+ # https://github.com/oneclick/rubyinstaller2/blob/b3dcbf69f131e44c78ea3a1c5e0041c223f266ce/lib/ruby_installer/build/utils.rb#L104-L144
3
+
4
+ module TaskExtension
5
+ # Extend rake's file task to be defined only once and to check the expected file is indeed generated
6
+ #
7
+ # The same as #task, but for #file.
8
+ # In addition this file task raises an error, if the file that is expected to be generated is not present after the block was executed.
9
+ def file(name, *args, &block)
10
+ task_once(name, block) do
11
+ super(name, *args) do |ta|
12
+ block.call(ta).tap do
13
+ raise "file #{ta.name} is missing after task executed" unless File.exist?(ta.name)
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ # Extend rake's task definition to be defined only once, even if called several times
20
+ #
21
+ # This allows to define common tasks next to specific tasks.
22
+ # It is expected that any variation of the task's block is reflected in the task name or namespace.
23
+ # If the task name is identical, the task block is executed only once, even if the file task definition is executed twice.
24
+ def task(name, *args, &block)
25
+ task_once(name, block) do
26
+ super
27
+ end
28
+ end
29
+
30
+ private def task_once(name, block)
31
+ name = name.keys.first if name.is_a?(Hash)
32
+ if block &&
33
+ Rake::Task.task_defined?(name) &&
34
+ Rake::Task[name].instance_variable_get('@task_block_location') == block.source_location
35
+ # task is already defined for this target and the same block
36
+ # So skip double definition of the same action
37
+ Rake::Task[name]
38
+ elsif block
39
+ yield.tap do
40
+ Rake::Task[name].instance_variable_set('@task_block_location', block.source_location)
41
+ end
42
+ else
43
+ yield
44
+ end
45
+ end
46
+ end
File without changes
data/sample/async_api.rb CHANGED
@@ -27,10 +27,6 @@ conn = PG::Connection.connect_start( :dbname => 'test' ) or
27
27
  abort "Connection failed: %s" % [ conn.error_message ] if
28
28
  conn.status == PG::CONNECTION_BAD
29
29
 
30
- # Now grab a reference to the underlying socket so we know when the
31
- # connection is established
32
- socket = conn.socket_io
33
-
34
30
  # Track the progress of the connection, waiting for the socket to become readable/writable
35
31
  # before polling it
36
32
  poll_status = PG::PGRES_POLLING_WRITING
@@ -41,13 +37,13 @@ until poll_status == PG::PGRES_POLLING_OK ||
41
37
  case poll_status
42
38
  when PG::PGRES_POLLING_READING
43
39
  output_progress " waiting for socket to become readable"
44
- select( [socket], nil, nil, TIMEOUT ) or
40
+ select( [conn.socket_io], nil, nil, TIMEOUT ) or
45
41
  raise "Asynchronous connection timed out!"
46
42
 
47
43
  # ...and the same for when the socket needs to write
48
44
  when PG::PGRES_POLLING_WRITING
49
45
  output_progress " waiting for socket to become writable"
50
- select( nil, [socket], nil, TIMEOUT ) or
46
+ select( nil, [conn.socket_io], nil, TIMEOUT ) or
51
47
  raise "Asynchronous connection timed out!"
52
48
  end
53
49
 
@@ -85,7 +81,7 @@ loop do
85
81
  # Buffer any incoming data on the socket until a full result is ready.
86
82
  conn.consume_input
87
83
  while conn.is_busy
88
- select( [socket], nil, nil, TIMEOUT ) or
84
+ select( [conn.socket_io], nil, nil, TIMEOUT ) or
89
85
  raise "Timeout waiting for query response."
90
86
  conn.consume_input
91
87
  end
File without changes
File without changes
data/sample/check_conn.rb CHANGED
File without changes
data/sample/copydata.rb CHANGED
File without changes
data/sample/copyfrom.rb CHANGED
File without changes
data/sample/copyto.rb CHANGED
File without changes
data/sample/cursor.rb CHANGED
File without changes
File without changes
data/sample/issue-119.rb CHANGED
File without changes
data/sample/losample.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,40 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
8
8
  - Lars Kanis
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIID+DCCAmCgAwIBAgIBBDANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
15
- REM9RmFlcmllTVVEL0RDPW9yZzAeFw0yMjAxMDcyMzU4MTRaFw0yMzAxMDcyMzU4
16
- MTRaMCIxIDAeBgNVBAMMF2dlZC9EQz1GYWVyaWVNVUQvREM9b3JnMIIBojANBgkq
17
- hkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAvyVhkRzvlEs0fe7145BYLfN6njX9ih5H
18
- L60U0p0euIurpv84op9CNKF9tx+1WKwyQvQP7qFGuZxkSUuWcP/sFhDXL1lWUuIl
19
- M4uHbGCRmOshDrF4dgnBeOvkHr1fIhPlJm5FO+Vew8tSQmlDsosxLUx+VB7DrVFO
20
- 5PU2AEbf04GGSrmqADGWXeaslaoRdb1fu/0M5qfPTRn5V39sWD9umuDAF9qqil/x
21
- Sl6phTvgBrG8GExHbNZpLARd3xrBYLEFsX7RvBn2UPfgsrtvpdXjsHGfpT3IPN+B
22
- vQ66lts4alKC69TE5cuKasWBm+16A4aEe3XdZBRNmtOu/g81gvwA7fkJHKllJuaI
23
- dXzdHqq+zbGZVSQ7pRYHYomD0IiDe1DbIouFnPWmagaBnGHwXkDT2bKKP+s2v21m
24
- ozilJg4aar2okb/RA6VS87o+d7g6LpDDMMQjH4G9OPnJENLdhu8KnPw/ivSVvQw7
25
- N2I4L/ZOIe2DIVuYH7aLHfjZDQv/mNgpAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYD
26
- VR0PBAQDAgSwMB0GA1UdDgQWBBRyjf55EbrHagiRLqt5YAd3yb8k4DANBgkqhkiG
27
- 9w0BAQsFAAOCAYEASrm1AbEoxACZ9WXJH3R5axV3U0CA4xaETlL2YT+2nOfVBMQ9
28
- 0ZlkPx6j4ghKJgAIi1TMfDM2JyPJsppQh8tiNccDjWc62UZRY/dq26cMqf/lcI+a
29
- 6YBuEYvzZfearwVs8tHnXtwYV3WSCoCOQaB+nq2lA1O+nkKNl41WOsVbNama5jx3
30
- 8cQtVSEEmZy6jIDJ8c5TmBJ7BQUDEUEWA/A3V42Xyctoj7DvUXWE0lP+X6ypAVSr
31
- lFh3TS64D7NTvxkmg7natUoCvobl6kGl4yMaqE4YRTlfuzhpf91TSOntClqrAOsS
32
- K1s56WndQj3IoBocdY9mQhDZLtLHofSkymoP8btBlj5SsN24TiF0VMSZlctSCYZg
33
- GKyHim/MMlIfGOWsgfioq5jzwmql7W4CDubbb8Lkg70v+hN2E/MnNVAcNE3gyaGc
34
- P5YP5BAbNW+gvd3QHRiWTTuhgHrdDnGdXg93N2M5KHn1ug8BtPLQwlcFwEpKnlLn
35
- btEP+7EplFuoiMfd
14
+ MIIETTCCArWgAwIBAgIBATANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
15
+ L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yMjAyMTQxMzMwNTZaFw0yMzAy
16
+ MTQxMzMwNTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
17
+ PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
18
+ mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
19
+ eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
20
+ 8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
21
+ SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
22
+ JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
23
+ eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
24
+ chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
25
+ 9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjgYEwfzAJ
26
+ BgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUOIdbSMr3VFrTCO9/cTM0
27
+ 0exHzBcwIgYDVR0RBBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwIgYDVR0S
28
+ BBswGYEXbGFyc0BncmVpei1yZWluc2RvcmYuZGUwDQYJKoZIhvcNAQELBQADggGB
29
+ AFWP7F/y3Oq3NgrqUOnjKOeDaBa7AqNhHS+PZg+C90lnJzMgOs4KKgZYxqSQVSab
30
+ SCEmzIO/StkXY4NpJ4fYLrHemf/fJy1wPyu+fNdp5SEEUwEo+2toRFlzTe4u4LdS
31
+ QC636nPPTMt8H3xz2wf/lUIUeo2Qc95Qt2BQM465ibbG9kmA3c7Sopx6yOabYOAl
32
+ KPRbOSEPiWYcF9Suuz8Gdf8jxEtPlnZiwRvnYJ+IHMq3XQCJWPpMzdDMbtlgHbXE
33
+ vq1zOTLMSYAS0UB3uionR4yo1hLz60odwkCm7qf0o2Ci/5OjtB0a89VuyqRU2vUJ
34
+ QH95WBjDJ6lCCW7J0mrMPnJQSUFTmufsU6jOChvPaCeAzW1YwrsP/YKnvwueG7ip
35
+ VOdW6RitjtFxhS7evRL0201+KUvLz12zZWWjOcujlQs64QprxOtiv/MiisKb1Ng+
36
+ oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
37
+ nA==
36
38
  -----END CERTIFICATE-----
37
- date: 2022-01-23 00:00:00.000000000 Z
39
+ date: 2022-03-31 00:00:00.000000000 Z
38
40
  dependencies: []
39
41
  description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
40
42
  9.3 and later.
@@ -72,6 +74,7 @@ files:
72
74
  - Rakefile
73
75
  - Rakefile.cross
74
76
  - certs/ged.pem
77
+ - certs/larskanis-2022.pem
75
78
  - ext/errorcodes.def
76
79
  - ext/errorcodes.rb
77
80
  - ext/errorcodes.txt
@@ -131,6 +134,7 @@ files:
131
134
  - misc/ruby-pg/Rakefile
132
135
  - misc/ruby-pg/lib/ruby/pg.rb
133
136
  - pg.gemspec
137
+ - rakelib/task_extension.rb
134
138
  - sample/array_insert.rb
135
139
  - sample/async_api.rb
136
140
  - sample/async_copyto.rb
@@ -158,7 +162,7 @@ metadata:
158
162
  source_code_uri: https://github.com/ged/ruby-pg
159
163
  changelog_uri: https://github.com/ged/ruby-pg/blob/master/History.rdoc
160
164
  documentation_uri: http://deveiate.org/code/pg
161
- post_install_message:
165
+ post_install_message:
162
166
  rdoc_options:
163
167
  - "--main"
164
168
  - README.rdoc
@@ -175,8 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
179
  - !ruby/object:Gem::Version
176
180
  version: '0'
177
181
  requirements: []
178
- rubygems_version: 3.2.22
179
- signing_key:
182
+ rubygems_version: 3.2.15
183
+ signing_key:
180
184
  specification_version: 4
181
185
  summary: Pg is the Ruby interface to the PostgreSQL RDBMS
182
186
  test_files: []
metadata.gz.sig CHANGED
Binary file