pg 1.3.0.rc1 → 1.3.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/binary-gems.yml +14 -9
- data/.github/workflows/source-gem.yml +9 -8
- data/Gemfile +1 -1
- data/History.rdoc +4 -2
- data/Rakefile.cross +2 -1
- data/ext/pg.c +24 -3
- data/ext/pg_connection.c +88 -274
- data/lib/pg/basic_type_registry.rb +1 -1
- data/lib/pg/connection.rb +236 -27
- data/lib/pg/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +27 -19
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01977a78278505c93856525a241f0f1bd8d4aefbec15c2851ee3acf27f57b22a'
|
4
|
+
data.tar.gz: b570352e689abc3eef0b129b5533bdecf814b0587a9852d9c0137880372c9fdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4b30c1e706f276d6e623a5171b17084923fb858c7d0f5986b8baba37b3403aa79e9a044ec3c787da99a7fe51d1efb5772ae64512e7df731001ae4e187668392
|
7
|
+
data.tar.gz: a2679e47f258f04b1be5fcb58359a79310e6478293d905745c44e902c21336054c22f4ac5e72f4ce96f533caecb529d377a6f82a976ece74ffc98fe6e0709299
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
name:
|
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.
|
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
|
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.
|
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
|
59
|
+
uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
|
55
60
|
with:
|
56
61
|
ruby-version: ${{ matrix.ruby }}
|
57
62
|
|
@@ -75,6 +80,6 @@ jobs:
|
|
75
80
|
echo "PGPASSWORD=" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
76
81
|
|
77
82
|
- run: bundle install
|
78
|
-
- run: gem install --local
|
83
|
+
- run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
|
79
84
|
- name: Run specs
|
80
85
|
run: ruby -rpg -S rspec spec/**/*_spec.rb
|
@@ -1,4 +1,4 @@
|
|
1
|
-
name:
|
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.
|
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.
|
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.
|
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:
|
58
|
-
PGVER: "
|
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
|
|
@@ -113,9 +113,10 @@ jobs:
|
|
113
113
|
- run: bundle install
|
114
114
|
|
115
115
|
- run: gem install --local *.gem --verbose
|
116
|
+
continue-on-error: ${{ matrix.ruby == 'truffleruby-head' }}
|
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
data/History.rdoc
CHANGED
@@ -3,8 +3,8 @@
|
|
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.
|
7
|
-
- Add
|
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.
|
@@ -43,6 +43,7 @@ Other Enhancements:
|
|
43
43
|
- Support ObjectSpace.memsize_of(obj) on all classes implemented in C. #393
|
44
44
|
- Make all PG objects implemented in C memory moveable and therefore GC.compact friendly. #349
|
45
45
|
- Update errorcodes and error classes to PostgreSQL-14.0.
|
46
|
+
- Add PG::CONNECTION_* constants for conn.status of newer PostgreSQL versions.
|
46
47
|
- Add better support for logical replication. #339
|
47
48
|
- Change conn.socket_io to read+write mode and to a BasicSocket object instead of IO.
|
48
49
|
- Use rb_io_wait() and the conn.socket_io object if available and remove Windows specific wait functions.
|
@@ -53,6 +54,7 @@ Bugfixes:
|
|
53
54
|
- Fix Connection#transaction to no longer block on interrupts, for instance when pressing Ctrl-C and cancel a running query. #390
|
54
55
|
- Avoid casting of OIDs to fix compat with Redshift database. #369
|
55
56
|
- Call conn.block before each conn.get_result call to avoid possible blocking in case of a slow network and multiple query results.
|
57
|
+
- Sporadic Errno::ENOTSOCK when using conn.socket_io on Windows #398
|
56
58
|
|
57
59
|
Deprecated:
|
58
60
|
- 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/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
|
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
|
|