pg 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 066fc0a1f6e951b395f258798f382417c51be61dba5c3999ef6712bb793dc138
4
- data.tar.gz: a8944c0abae70b7996067dec9a613f750d8cffbbd69e75ab8c35759a36cada53
3
+ metadata.gz: a0eaae99ad4fc07def8a363e6e2443ee34cf24074e70308107e76a105c31dc30
4
+ data.tar.gz: 95dc7830051f1a8533d897cb04b396baf619343bfdab2b54b8dae5036dcd9d82
5
5
  SHA512:
6
- metadata.gz: c689ccbb0410d6b704144e18d8fb5cf747599f8ad0d84be1d265374f568a9a44b77be6542a36f6c7acdb8dbf862c352e0b0de3d576be82e6d1599801fb7546f0
7
- data.tar.gz: e0be5c3b24a89b294f1c7762d027f424670b191437db0f35ee74994389e15a5059899740c137918c25eb50906ee1a8979a9c5fcd67a72ff3b69519d1b096229f
6
+ metadata.gz: f986724a80d0d21685197d1933d3fa0a044a163ad05e5128655949a3463bfce733d0f7be1ade9859548aeb809061e16ff52dfee9e737e93c7d2abc12feec1b2a
7
+ data.tar.gz: d2f64554842a7cc6449a010d703684eb4e62b369334fd0dad17382c25826655a3c20fadfef6ea4cd0899aca867b1d9d96d981d9eaed006eea7d80d72ef18136a
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:
@@ -31,7 +31,7 @@ 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"
@@ -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
data/History.rdoc CHANGED
@@ -1,4 +1,19 @@
1
- == v1.3.1 [YYYY-MM-DD] Michael Granger <ged@FaerieMUD.org>
1
+ == v1.3.2 [2022-02-14] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ Bugfixes:
4
+
5
+ - Cancel only active query after failing transaction. #430
6
+ This avoids an incompatibility with pgbouncer since pg-1.3.0.
7
+ - Fix String objects with non-applied encoding when using COPY or record decoders. #427
8
+ - Update Windows fat binary gem to PostgreSQL-14.2.
9
+
10
+ Enhancements:
11
+
12
+ - Improve extconf.rb checks to reduces the number of compiler calls.
13
+ - Add a check for PGRES_PIPELINE_SYNC, to make sure the library version and the header files are PostgreSQL-14+. #429
14
+
15
+
16
+ == v1.3.1 [2022-02-01] Michael Granger <ged@FaerieMUD.org>
2
17
 
3
18
  Bugfixes:
4
19
 
data/Rakefile.cross CHANGED
@@ -30,7 +30,7 @@ class CrossLibrary < OpenStruct
30
30
 
31
31
  # Cross-compilation constants
32
32
  self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1m'
33
- self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.1'
33
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.2'
34
34
 
35
35
  # Check if symlinks work in the current working directory.
36
36
  # This fails, if rake-comp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GUwDQYJKoZIhvcNAQELBQADggGB
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/extconf.rb CHANGED
@@ -138,15 +138,18 @@ if /mingw/ =~ RUBY_PLATFORM && RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc/
138
138
  end
139
139
  end
140
140
 
141
- have_func 'PQconninfo' or
141
+ have_func 'PQconninfo', 'libpq-fe.h' or
142
142
  abort "Your PostgreSQL is too old. Either install an older version " +
143
143
  "of this gem or upgrade your database to at least PostgreSQL-9.3."
144
144
  # 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
145
+ have_func 'PQsslAttribute', 'libpq-fe.h' # since PostgreSQL-9.5
146
+ have_func 'PQresultVerboseErrorMessage', 'libpq-fe.h' # since PostgreSQL-9.6
147
+ have_func 'PQencryptPasswordConn', 'libpq-fe.h' # since PostgreSQL-10
148
+ have_func 'PQresultMemorySize', 'libpq-fe.h' # since PostgreSQL-12
149
+ have_func 'PQenterPipelineMode', 'libpq-fe.h' do |src| # since PostgreSQL-14
150
+ # Ensure header files fit as well
151
+ src + " int con(){ return PGRES_PIPELINE_SYNC; }"
152
+ end
150
153
  have_func 'timegm'
151
154
  have_func 'rb_gc_adjust_memory_usage' # since ruby-2.4
152
155
  have_func 'rb_gc_mark_movable' # since ruby-2.7
@@ -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
  }
data/lib/pg/connection.rb CHANGED
@@ -313,7 +313,7 @@ class PG::Connection
313
313
  exec "BEGIN"
314
314
  res = yield(self)
315
315
  rescue Exception
316
- cancel if transaction_status != PG::PQTRANS_IDLE
316
+ cancel if transaction_status == PG::PQTRANS_ACTIVE
317
317
  block
318
318
  exec "ROLLBACK"
319
319
  raise
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.3.1'
3
+ VERSION = '1.3.2'
4
4
  end
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.1
4
+ version: 1.3.2
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/ZOIe2DIVuY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ip
35
+ VOdW6RitjtFxhS7evRL0201+KUvLz12zZWWjOcujlQs64QprxOtiv/MiisKb1Ng+
36
+ oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
37
+ nA==
36
38
  -----END CERTIFICATE-----
37
- date: 2022-02-01 00:00:00.000000000 Z
39
+ date: 2022-02-14 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
@@ -158,7 +161,7 @@ metadata:
158
161
  source_code_uri: https://github.com/ged/ruby-pg
159
162
  changelog_uri: https://github.com/ged/ruby-pg/blob/master/History.rdoc
160
163
  documentation_uri: http://deveiate.org/code/pg
161
- post_install_message:
164
+ post_install_message:
162
165
  rdoc_options:
163
166
  - "--main"
164
167
  - README.rdoc
@@ -175,8 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
178
  - !ruby/object:Gem::Version
176
179
  version: '0'
177
180
  requirements: []
178
- rubygems_version: 3.2.22
179
- signing_key:
181
+ rubygems_version: 3.2.15
182
+ signing_key:
180
183
  specification_version: 4
181
184
  summary: Pg is the Ruby interface to the PostgreSQL RDBMS
182
185
  test_files: []
metadata.gz.sig CHANGED
Binary file