pg 1.3.0.rc1-x64-mingw32 → 1.3.0-x64-mingw32

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: aeaae01e3d0a2d15b2bc2f3e4be6b48ac92645a6df9a2c15dd08c9e660098b2d
4
- data.tar.gz: 06a1f5a7a3e673065cadacfef64a30b58c90bf9c23e97e702b048e044dcd6e1a
3
+ metadata.gz: c98f6d3bee2e5b3ef077b19719224c89cd0dbb82f26349ab2cd8cfdb2d0590d0
4
+ data.tar.gz: 0fc2ad1d432b39e44451d42bb02c1278ca3e3072a374f382bcd70a9406f0e97a
5
5
  SHA512:
6
- metadata.gz: b9e0a99a019c965dcb2391f7bb2954aaf57f14b036d66ac45a19f189404cc27b2dc3cc8dcd12f01183d871172deab9752df627ae9c54d80b5f8081595ae39af3
7
- data.tar.gz: cc48d30caad8570f86fc713b61eb1515741b0140f67b939ee2cce7624ae107d28eae6a8a2f067ec7959de65a871bd4fef60a95dfa593f7936436b7c8ac424369
6
+ metadata.gz: ad00fd1387bd71119641a67dc98ce21ecfd300a9df6d9654e1ccec9a1868417fef442be78b8b0556b0204b34d97755c6e467fe7cd7bdf137b26c49b4a77108ad
7
+ data.tar.gz: e4bd8656a70ff5be7a7f556ac9bbcbedf30eeadce7f87a7a2123eba79bbc9ea3066c8a9707554f8eab4a4147f646d1f4b9d893b7f68995692d654e09a791e514
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- name: Build and test binary gems
1
+ name: Binary gems
2
2
 
3
3
  on: [push, pull_request]
4
4
 
@@ -6,12 +6,18 @@ jobs:
6
6
  job_build_x64:
7
7
  name: build
8
8
  runs-on: ubuntu-latest
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ include:
13
+ - platform: "x64-mingw-ucrt"
14
+ - platform: "x64-mingw32"
9
15
  steps:
10
16
  - uses: actions/checkout@v2
11
17
  - name: Set up Ruby
12
18
  uses: ruby/setup-ruby@v1
13
19
  with:
14
- ruby-version: "3.0"
20
+ ruby-version: "3.1"
15
21
  - run: bundle install
16
22
 
17
23
  - name: Create a dummy cert to satisfy the build
@@ -22,7 +28,7 @@ jobs:
22
28
  cp gem-public_cert.pem ~/.gem/gem-public_cert.pem
23
29
 
24
30
  - name: Build binary gem
25
- run: bundle exec rake gem:windows:x64-mingw32
31
+ run: bundle exec rake gem:windows:${{ matrix.platform }}
26
32
 
27
33
  - name: Upload binary gem
28
34
  uses: actions/upload-artifact@v2
@@ -37,21 +43,20 @@ jobs:
37
43
  fail-fast: false
38
44
  matrix:
39
45
  include:
40
- - ruby: "3.0"
46
+ - ruby: "3.1"
47
+ platform: "x64-mingw-ucrt"
41
48
  PGVERSION: 14.0-1-windows-x64
42
- PGVER: "14"
43
49
  - ruby: "2.5"
50
+ platform: "x64-mingw32"
44
51
  PGVERSION: 10.16-1-windows
45
- PGVER: "10"
46
52
 
47
53
  runs-on: windows-latest
48
54
  env:
49
55
  PGVERSION: ${{ matrix.PGVERSION }}
50
- PGVER: ${{ matrix.PGVER }}
51
56
  steps:
52
57
  - uses: actions/checkout@v2
53
58
  - name: Set up Ruby
54
- uses: ruby/setup-ruby@v1
59
+ uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
55
60
  with:
56
61
  ruby-version: ${{ matrix.ruby }}
57
62
 
@@ -74,7 +79,8 @@ jobs:
74
79
  echo "PGUSER=$env:USERNAME" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
75
80
  echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
76
81
 
82
+ - run: gem update --system
77
83
  - run: bundle install
78
- - run: gem install --local *.gem --verbose
84
+ - run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
79
85
  - name: Run specs
80
86
  run: ruby -rpg -S rspec spec/**/*_spec.rb
@@ -1,4 +1,4 @@
1
- name: Build and test source gem
1
+ name: Source gem
2
2
 
3
3
  on: [push, pull_request]
4
4
 
@@ -11,7 +11,7 @@ jobs:
11
11
  - name: Set up Ruby
12
12
  uses: ruby/setup-ruby@v1
13
13
  with:
14
- ruby-version: "3.0"
14
+ ruby-version: "3.1"
15
15
 
16
16
  - name: Build source gem
17
17
  run: gem build pg.gemspec
@@ -31,7 +31,7 @@ jobs:
31
31
  include:
32
32
  - os: windows
33
33
  ruby: "head"
34
- PGVERSION: 14.0-1-windows-x64
34
+ PGVERSION: 14.1-1-windows-x64
35
35
  PGVER: "14"
36
36
  - os: windows
37
37
  ruby: "2.5"
@@ -41,7 +41,7 @@ jobs:
41
41
  ruby: "head"
42
42
  PGVER: "14"
43
43
  - os: ubuntu
44
- ruby: "3.0"
44
+ ruby: "3.1"
45
45
  PGVER: "12"
46
46
  - os: ubuntu
47
47
  ruby: "2.5"
@@ -54,8 +54,8 @@ jobs:
54
54
  PGVER: "14"
55
55
  - os: macos
56
56
  ruby: "head"
57
- PGVERSION: 13.2-1-osx
58
- PGVER: "13"
57
+ PGVERSION: 14.1-1-osx
58
+ PGVER: "14"
59
59
 
60
60
  runs-on: ${{ matrix.os }}-latest
61
61
  env:
@@ -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
68
+ uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
69
69
  with:
70
70
  ruby-version: ${{ matrix.ruby }}
71
71
 
@@ -110,12 +110,13 @@ jobs:
110
110
  unzip postgresql-$PGVERSION-binaries.zip && \
111
111
  echo `pwd`/pgsql/bin >> $GITHUB_PATH
112
112
 
113
+ - run: gem update --system
113
114
  - run: bundle install
114
115
 
115
116
  - run: gem install --local *.gem --verbose
116
117
 
117
118
  - name: Run specs
118
- continue-on-error: ${{ matrix.ruby == 'truffleruby' }}
119
+ continue-on-error: ${{ matrix.ruby == 'truffleruby-head' }}
119
120
  env:
120
121
  PG_DEBUG: 0
121
122
  run: ruby -rpg -S rspec spec/**/*_spec.rb -cfdoc
data/Gemfile CHANGED
@@ -9,6 +9,6 @@ group :development, :test do
9
9
  gem "bundler", ">= 1.16", "< 3.0"
10
10
  gem "rake-compiler", "~> 1.0"
11
11
  gem "rake-compiler-dock", "~> 1.0"
12
- gem "rdoc", "~> 5.1"
12
+ gem "rdoc", "~> 6.4"
13
13
  gem "rspec", "~> 3.5"
14
14
  end
data/History.rdoc CHANGED
@@ -1,10 +1,10 @@
1
- == v1.3.0 [YYY-MM-DD] Michael Granger <ged@FaerieMUD.org>
1
+ == v1.3.0 [2022-01-20] Michael Granger <ged@FaerieMUD.org>
2
2
 
3
3
  Install Enhancements:
4
4
  - Print some install help if libpq wasn't found. #396
5
5
  This should help to pick the necessary package without googling.
6
- - Update Windows fat binary gem to OpenSSL-1.1.1l and PostgreSQL-14.0.
7
- - Add a binary gem for Ruby 3.0.
6
+ - Update Windows fat binary gem to OpenSSL-1.1.1m and PostgreSQL-14.1.
7
+ - Add binary Windows gems for Ruby 3.0 and 3.1.
8
8
  - 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
9
9
  - Fall back to pkg-config if pg_config is not found. #380
10
10
  - Add option to extconf.rb to disable nogvl-wrapping of libpq functions.
@@ -27,6 +27,8 @@ API Enhancements:
27
27
  - Make discard_results scheduler friendly
28
28
  - Do all socket waiting through the conn.socket_io object.
29
29
  - Avoid PG.connect blocking while address resolution by automatically providing the +hostaddr+ parameter.
30
+ - On Windows Fiber.scheduler support requires Ruby-3.1+.
31
+ It is also only partly usable since may ruby IO methods are not yet scheduler aware on Windows.
30
32
  - Add support for pipeline mode of PostgreSQL-14. #401
31
33
  - Allow specification of multiple hosts in PostgreSQL URI. #387
32
34
  - Add new method conn.backend_key - used to implement our own cancel method.
@@ -43,16 +45,19 @@ Other Enhancements:
43
45
  - Support ObjectSpace.memsize_of(obj) on all classes implemented in C. #393
44
46
  - Make all PG objects implemented in C memory moveable and therefore GC.compact friendly. #349
45
47
  - Update errorcodes and error classes to PostgreSQL-14.0.
48
+ - Add PG::CONNECTION_* constants for conn.status of newer PostgreSQL versions.
46
49
  - Add better support for logical replication. #339
47
50
  - Change conn.socket_io to read+write mode and to a BasicSocket object instead of IO.
48
- - Use rb_io_wait() and the conn.socket_io object if available and remove Windows specific wait functions.
49
- Fall back to rb_wait_for_single_fd() on ruby < 3.0, which works on Windows as well.
51
+ - Use rb_io_wait() and the conn.socket_io object if available for better compatibility to Fiber.scheduler .
52
+ Fall back to rb_wait_for_single_fd() on ruby < 3.0.
53
+ - On Windows use a specialized wait function as a workaround for very poor performance of rb_io_wait(). #416
50
54
 
51
55
  Bugfixes:
52
56
  - Release GVL while calling PQping which is a blocking method, but it didn't release GVL so far.
53
57
  - Fix Connection#transaction to no longer block on interrupts, for instance when pressing Ctrl-C and cancel a running query. #390
54
58
  - Avoid casting of OIDs to fix compat with Redshift database. #369
55
59
  - Call conn.block before each conn.get_result call to avoid possible blocking in case of a slow network and multiple query results.
60
+ - Sporadic Errno::ENOTSOCK when using conn.socket_io on Windows #398
56
61
 
57
62
  Deprecated:
58
63
  - Add deprecation warning to PG::BasicTypeRegistry.register_type and siblings.
data/Rakefile.cross CHANGED
@@ -250,6 +250,7 @@ class CrossLibrary < OpenStruct
250
250
  end
251
251
 
252
252
  CrossLibraries = [
253
+ ['x64-mingw-ucrt', 'mingw64', 'x86_64-w64-mingw32'],
253
254
  ['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
254
255
  ['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
255
256
  ].map do |platform, openssl_config, toolchain|
@@ -291,7 +292,7 @@ CrossLibraries.each do |xlib|
291
292
  RakeCompilerDock.sh <<-EOT, platform: platform
292
293
  (cp build/gem/gem-*.pem ~/.gem/ || true) &&
293
294
  bundle install --local &&
294
- rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKE="make -j`nproc`" RUBY_CC_VERSION=3.0.0:2.7.0:2.6.0:2.5.0
295
+ rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKE="make -j`nproc`" RUBY_CC_VERSION=3.1.0:3.0.0:2.7.0:2.6.0:2.5.0
295
296
  EOT
296
297
  end
297
298
  desc "Build the windows binary gems"
data/certs/ged.pem CHANGED
@@ -1,7 +1,7 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIID+DCCAmCgAwIBAgIBAzANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
3
- REM9RmFlcmllTVVEL0RDPW9yZzAeFw0yMDEyMjQyMDU1MjlaFw0yMTEyMjQyMDU1
4
- MjlaMCIxIDAeBgNVBAMMF2dlZC9EQz1GYWVyaWVNVUQvREM9b3JnMIIBojANBgkq
2
+ MIID+DCCAmCgAwIBAgIBBDANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
3
+ REM9RmFlcmllTVVEL0RDPW9yZzAeFw0yMjAxMDcyMzU4MTRaFw0yMzAxMDcyMzU4
4
+ MTRaMCIxIDAeBgNVBAMMF2dlZC9EQz1GYWVyaWVNVUQvREM9b3JnMIIBojANBgkq
5
5
  hkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAvyVhkRzvlEs0fe7145BYLfN6njX9ih5H
6
6
  L60U0p0euIurpv84op9CNKF9tx+1WKwyQvQP7qFGuZxkSUuWcP/sFhDXL1lWUuIl
7
7
  M4uHbGCRmOshDrF4dgnBeOvkHr1fIhPlJm5FO+Vew8tSQmlDsosxLUx+VB7DrVFO
@@ -12,13 +12,13 @@ dXzdHqq+zbGZVSQ7pRYHYomD0IiDe1DbIouFnPWmagaBnGHwXkDT2bKKP+s2v21m
12
12
  ozilJg4aar2okb/RA6VS87o+d7g6LpDDMMQjH4G9OPnJENLdhu8KnPw/ivSVvQw7
13
13
  N2I4L/ZOIe2DIVuYH7aLHfjZDQv/mNgpAgMB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SZlctSCYZg
21
+ GKyHim/MMlIfGOWsgfioq5jzwmql7W4CDubbb8Lkg70v+hN2E/MnNVAcNE3gyaGc
22
+ P5YP5BAbNW+gvd3QHRiWTTuhgHrdDnGdXg93N2M5KHn1ug8BtPLQwlcFwEpKnlLn
23
+ btEP+7EplFuoiMfd
24
24
  -----END CERTIFICATE-----
data/ext/extconf.rb CHANGED
@@ -155,6 +155,7 @@ have_func 'rb_io_wait' # since ruby-3.0
155
155
  # unistd.h confilicts with ruby/win32.h when cross compiling for win32 and ruby 1.9.1
156
156
  have_header 'unistd.h'
157
157
  have_header 'inttypes.h'
158
+ have_header('ruby/fiber/scheduler.h') if RUBY_PLATFORM=~/mingw|mswin/
158
159
 
159
160
  checking_for "C99 variable length arrays" do
160
161
  $defs.push( "-DHAVE_VARIABLE_LENGTH_ARRAYS" ) if try_compile('void test_vla(int l){ int vla[l]; }')
data/ext/pg.c CHANGED
@@ -47,6 +47,7 @@
47
47
  */
48
48
 
49
49
  #include "pg.h"
50
+ #include "pg_config.h"
50
51
 
51
52
  int pg_skip_deprecation_warning;
52
53
  VALUE rb_mPG;
@@ -415,14 +416,34 @@ Init_pg_ext()
415
416
  rb_define_const(rb_mPGconstants, "CONNECTION_MADE", INT2FIX(CONNECTION_MADE));
416
417
  /* Waiting for a response from the server. */
417
418
  rb_define_const(rb_mPGconstants, "CONNECTION_AWAITING_RESPONSE", INT2FIX(CONNECTION_AWAITING_RESPONSE));
418
- /* Received authentication; waiting for backend start-up to finish. */
419
+ /* Received authentication; waiting for backend startup. */
419
420
  rb_define_const(rb_mPGconstants, "CONNECTION_AUTH_OK", INT2FIX(CONNECTION_AUTH_OK));
421
+ /* This state is no longer used. */
422
+ rb_define_const(rb_mPGconstants, "CONNECTION_SETENV", INT2FIX(CONNECTION_SETENV));
420
423
  /* Negotiating SSL encryption. */
421
424
  rb_define_const(rb_mPGconstants, "CONNECTION_SSL_STARTUP", INT2FIX(CONNECTION_SSL_STARTUP));
422
- /* Negotiating environment-driven parameter settings. */
423
- rb_define_const(rb_mPGconstants, "CONNECTION_SETENV", INT2FIX(CONNECTION_SETENV));
424
425
  /* Internal state - PG.connect() needed. */
425
426
  rb_define_const(rb_mPGconstants, "CONNECTION_NEEDED", INT2FIX(CONNECTION_NEEDED));
427
+ #if PG_MAJORVERSION_NUM >= 10
428
+ /* Checking if session is read-write. Available since PostgreSQL-10. */
429
+ rb_define_const(rb_mPGconstants, "CONNECTION_CHECK_WRITABLE", INT2FIX(CONNECTION_CHECK_WRITABLE));
430
+ #endif
431
+ #if PG_MAJORVERSION_NUM >= 10
432
+ /* Consuming any extra messages. Available since PostgreSQL-10. */
433
+ rb_define_const(rb_mPGconstants, "CONNECTION_CONSUME", INT2FIX(CONNECTION_CONSUME));
434
+ #endif
435
+ #if PG_MAJORVERSION_NUM >= 12
436
+ /* Negotiating GSSAPI. Available since PostgreSQL-12. */
437
+ rb_define_const(rb_mPGconstants, "CONNECTION_GSS_STARTUP", INT2FIX(CONNECTION_GSS_STARTUP));
438
+ #endif
439
+ #if PG_MAJORVERSION_NUM >= 13
440
+ /* Checking target server properties. Available since PostgreSQL-13. */
441
+ rb_define_const(rb_mPGconstants, "CONNECTION_CHECK_TARGET", INT2FIX(CONNECTION_CHECK_TARGET));
442
+ #endif
443
+ #if PG_MAJORVERSION_NUM >= 14
444
+ /* Checking if server is in standby mode. Available since PostgreSQL-14. */
445
+ rb_define_const(rb_mPGconstants, "CONNECTION_CHECK_STANDBY", INT2FIX(CONNECTION_CHECK_STANDBY));
446
+ #endif
426
447
 
427
448
  /****** PG::Connection CLASS CONSTANTS: Nonblocking connection polling status ******/
428
449