pg 1.4.4 → 1.4.5

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: 7796bdf07cbb37a4b63c29b24e18e312682eca28a98042ce7e050c99b6fa6b98
4
- data.tar.gz: 4c2e99d5a102f695f82f3f0fe626a63eff42a416fc1db99175aa3dbecac0e010
3
+ metadata.gz: b41083be640213b535bce480cc5001eb076fb805a36dece37ad143e3d0528d09
4
+ data.tar.gz: 1ec6569ed34148a889cdee8d4f1ffbfd9d303929d6b96b752060ffcca84560df
5
5
  SHA512:
6
- metadata.gz: ef67ef88819cf75dd74b8f15843b44a45dfe580bb8c51a632cef5a38c00b519cb81c0a84191fd94e281cb7e8264ebc31a32b9ad51b7e7e9c17e514fcf5f023e0
7
- data.tar.gz: 3bec55fa8e3a23dcef29673566f5c0570be43e319af84838625fcfe87aa81ff8e9b7ab9c1bed6ae6c28097d93a6675dd3ee5b03c9ece601f87be90e2d885ca75
6
+ metadata.gz: 82f8662a194ba0e49afde6b29b9cf87c0dcaef3328c4f04693f785e5cb2b405e686f14a23a4d52ad1d875e4fca4d52f98865da3fd36ff0b10c994080b1cd8cd3
7
+ data.tar.gz: 87ed2d9a1a0e1ce7792126468baa6d7ab3af377edd39855d6a3753554439ff24adb86467d0ea1c6f75f386df96cb16f4649d553da860b1c099a5fd61c36c8787
checksums.yaml.gz.sig CHANGED
Binary file
@@ -45,7 +45,7 @@ jobs:
45
45
  include:
46
46
  - ruby: "3.1"
47
47
  platform: "x64-mingw-ucrt"
48
- PGVERSION: 15.0-rc1-windows-x64
48
+ PGVERSION: 15.1-1-windows-x64
49
49
  - ruby: "2.5"
50
50
  platform: "x64-mingw32"
51
51
  PGVERSION: 10.20-1-windows
@@ -31,15 +31,15 @@ jobs:
31
31
  include:
32
32
  - os: windows
33
33
  ruby: "head"
34
- PGVERSION: 15.0-rc1-windows-x64
35
- PGVER: "14"
34
+ PGVERSION: 15.1-1-windows-x64
35
+ PGVER: "15"
36
36
  - os: windows
37
37
  ruby: "2.5"
38
38
  PGVERSION: 9.4.26-1-windows-x64
39
39
  PGVER: "9.4"
40
40
  - os: ubuntu
41
41
  ruby: "head"
42
- PGVER: "14"
42
+ PGVER: "15"
43
43
  - os: ubuntu
44
44
  ruby: "3.1"
45
45
  PGVER: "12"
@@ -51,11 +51,11 @@ jobs:
51
51
  PGVER: "13"
52
52
  - os: ubuntu
53
53
  ruby: "truffleruby-head"
54
- PGVER: "14"
54
+ PGVER: "15"
55
55
  - os: macos
56
56
  ruby: "head"
57
- PGVERSION: 13.8-1-osx
58
- PGVER: "13"
57
+ PGVERSION: 15.1-1-osx
58
+ PGVER: "15"
59
59
 
60
60
  runs-on: ${{ matrix.os }}-latest
61
61
  env:
data/History.rdoc CHANGED
@@ -1,3 +1,12 @@
1
+ == v1.4.5 [2022-11-17] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ - Return the libpq default port when blank in conninfo. #492
4
+ - Add PG::DEF_PGPORT constant and use it in specs. #492
5
+ - Fix name resolution when empty or `nil` port is given.
6
+ - Update error codes to PostgreSQL-15.
7
+ - Update Windows fat binary gem to PostgreSQL-15.1 AND OpenSSL-1.1.1s.
8
+
9
+
1
10
  == v1.4.4 [2022-10-11] Lars Kanis <lars@greiz-reinsdorf.de>
2
11
 
3
12
  - Revert to let libpq do the host iteration while connecting. #485
data/Rakefile CHANGED
@@ -92,7 +92,7 @@ end
92
92
 
93
93
  desc "Update list of server error codes"
94
94
  task :update_error_codes do
95
- URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_14_0"
95
+ URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_15_0"
96
96
 
97
97
  ERRORCODES_TXT = "ext/errorcodes.txt"
98
98
  sh "wget #{URL_ERRORCODES_TXT.inspect} -O #{ERRORCODES_TXT.inspect} || curl #{URL_ERRORCODES_TXT.inspect} -o #{ERRORCODES_TXT.inspect}"
data/Rakefile.cross CHANGED
@@ -31,8 +31,8 @@ class CrossLibrary < OpenStruct
31
31
  self.host_platform = toolchain
32
32
 
33
33
  # Cross-compilation constants
34
- self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1q'
35
- self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.5'
34
+ self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1s'
35
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '15.1'
36
36
 
37
37
  # Check if symlinks work in the current working directory.
38
38
  # This fails, if rake-compiler-dock is running on a Windows box.
data/ext/errorcodes.def CHANGED
@@ -366,6 +366,10 @@
366
366
  VALUE klass = define_error_class( "SqlJsonScalarRequired", "22" );
367
367
  register_error_class( "2203F", klass );
368
368
  }
369
+ {
370
+ VALUE klass = define_error_class( "SqlJsonItemCannotBeCastToTargetType", "22" );
371
+ register_error_class( "2203G", klass );
372
+ }
369
373
  {
370
374
  VALUE klass = define_error_class( "IntegrityConstraintViolation", NULL );
371
375
  register_error_class( "23000", klass );
data/ext/errorcodes.txt CHANGED
@@ -2,7 +2,7 @@
2
2
  # errcodes.txt
3
3
  # PostgreSQL error codes
4
4
  #
5
- # Copyright (c) 2003-2021, PostgreSQL Global Development Group
5
+ # Copyright (c) 2003-2022, PostgreSQL Global Development Group
6
6
  #
7
7
  # This list serves as the basis for generating source files containing error
8
8
  # codes. It is kept in a common format to make sure all these source files have
@@ -222,6 +222,7 @@ Section: Class 22 - Data Exception
222
222
  2203D E ERRCODE_TOO_MANY_JSON_ARRAY_ELEMENTS too_many_json_array_elements
223
223
  2203E E ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS too_many_json_object_members
224
224
  2203F E ERRCODE_SQL_JSON_SCALAR_REQUIRED sql_json_scalar_required
225
+ 2203G E ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE sql_json_item_cannot_be_cast_to_target_type
225
226
 
226
227
  Section: Class 23 - Integrity Constraint Violation
227
228
 
data/ext/pg.c CHANGED
@@ -679,6 +679,9 @@ Init_pg_ext(void)
679
679
  rb_define_const(rb_mPGconstants, "INVALID_OID", INT2FIX(InvalidOid));
680
680
  rb_define_const(rb_mPGconstants, "InvalidOid", INT2FIX(InvalidOid));
681
681
 
682
+ /* PostgreSQL compiled in default port */
683
+ rb_define_const(rb_mPGconstants, "DEF_PGPORT", INT2FIX(DEF_PGPORT));
684
+
682
685
  /* Add the constants to the toplevel namespace */
683
686
  rb_include_module( rb_mPG, rb_mPGconstants );
684
687
 
data/ext/pg_connection.c CHANGED
@@ -702,7 +702,10 @@ static VALUE
702
702
  pgconn_port(VALUE self)
703
703
  {
704
704
  char* port = PQport(pg_get_pgconn(self));
705
- return INT2NUM(atoi(port));
705
+ if (!port || port[0] == '\0')
706
+ return INT2NUM(DEF_PGPORT);
707
+ else
708
+ return INT2NUM(atoi(port));
706
709
  }
707
710
 
708
711
  /*
data/lib/pg/connection.rb CHANGED
@@ -723,6 +723,7 @@ class PG::Connection
723
723
  # This requires PostgreSQL-10+, so no DNS resolving is done on earlier versions.
724
724
  ihosts = iopts[:host].split(",", -1)
725
725
  iports = iopts[:port].split(",", -1)
726
+ iports = [nil] if iports.size == 0
726
727
  iports = iports * ihosts.size if iports.size == 1
727
728
  raise PG::ConnectionBad, "could not match #{iports.size} port numbers to #{ihosts.size} hosts" if iports.size != ihosts.size
728
729
 
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.4.4'
3
+ VERSION = '1.4.5'
4
4
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -30,7 +30,7 @@ cert_chain:
30
30
  sc3NyOkGUGdfiee5VRG31Sh3LLON3YGED+zZAS+ZF6598y4vhv8MBLa1Oy357byC
31
31
  tTg=
32
32
  -----END CERTIFICATE-----
33
- date: 2022-10-11 00:00:00.000000000 Z
33
+ date: 2022-11-17 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
36
36
  9.3 and later.
metadata.gz.sig CHANGED
Binary file