pg 1.5.4 → 1.6.1

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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/{History.md → CHANGELOG.md} +106 -4
  4. data/Gemfile +12 -3
  5. data/README-Windows.rdoc +1 -1
  6. data/README.ja.md +4 -4
  7. data/README.md +58 -17
  8. data/Rakefile +95 -14
  9. data/certs/kanis@comcard.de.pem +20 -0
  10. data/certs/larskanis-2024.pem +24 -0
  11. data/ext/errorcodes.def +4 -5
  12. data/ext/errorcodes.txt +2 -5
  13. data/ext/extconf.rb +161 -14
  14. data/ext/gvl_wrappers.c +13 -2
  15. data/ext/gvl_wrappers.h +33 -0
  16. data/ext/pg.c +17 -6
  17. data/ext/pg.h +9 -9
  18. data/ext/pg_binary_decoder.c +152 -0
  19. data/ext/pg_binary_encoder.c +211 -8
  20. data/ext/pg_cancel_connection.c +360 -0
  21. data/ext/pg_coder.c +54 -5
  22. data/ext/pg_connection.c +409 -167
  23. data/ext/pg_copy_coder.c +19 -15
  24. data/ext/pg_record_coder.c +7 -7
  25. data/ext/pg_result.c +11 -13
  26. data/ext/pg_text_decoder.c +4 -1
  27. data/ext/pg_text_encoder.c +37 -18
  28. data/ext/pg_tuple.c +2 -2
  29. data/ext/pg_type_map.c +1 -1
  30. data/ext/pg_type_map_all_strings.c +1 -1
  31. data/ext/pg_type_map_by_class.c +1 -1
  32. data/ext/pg_type_map_by_column.c +2 -1
  33. data/ext/pg_type_map_by_mri_type.c +1 -1
  34. data/ext/pg_type_map_by_oid.c +3 -1
  35. data/ext/pg_type_map_in_ruby.c +1 -1
  36. data/lib/pg/basic_type_map_for_queries.rb +15 -7
  37. data/lib/pg/basic_type_registry.rb +16 -4
  38. data/lib/pg/cancel_connection.rb +53 -0
  39. data/lib/pg/coder.rb +4 -2
  40. data/lib/pg/connection.rb +310 -167
  41. data/lib/pg/exceptions.rb +6 -0
  42. data/lib/pg/text_decoder/date.rb +3 -0
  43. data/lib/pg/text_decoder/json.rb +3 -0
  44. data/lib/pg/text_encoder/date.rb +1 -0
  45. data/lib/pg/text_encoder/inet.rb +3 -0
  46. data/lib/pg/text_encoder/json.rb +3 -0
  47. data/lib/pg/version.rb +1 -1
  48. data/lib/pg.rb +23 -8
  49. data/misc/yugabyte/Dockerfile +9 -0
  50. data/misc/yugabyte/docker-compose.yml +28 -0
  51. data/misc/yugabyte/pg-test.rb +45 -0
  52. data/pg.gemspec +8 -4
  53. data/ports/patches/krb5/1.21.3/0001-Allow-static-linking-krb5-library.patch +30 -0
  54. data/ports/patches/openssl/3.5.1/0001-aarch64-mingw.patch +21 -0
  55. data/ports/patches/postgresql/17.5/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch +42 -0
  56. data/ports/patches/postgresql/17.5/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch +52 -0
  57. data/rakelib/pg_gem_helper.rb +64 -0
  58. data.tar.gz.sig +0 -0
  59. metadata +45 -47
  60. metadata.gz.sig +0 -0
  61. data/.appveyor.yml +0 -42
  62. data/.gems +0 -6
  63. data/.gemtest +0 -0
  64. data/.github/workflows/binary-gems.yml +0 -117
  65. data/.github/workflows/source-gem.yml +0 -141
  66. data/.gitignore +0 -22
  67. data/.hgsigs +0 -34
  68. data/.hgtags +0 -41
  69. data/.irbrc +0 -23
  70. data/.pryrc +0 -23
  71. data/.tm_properties +0 -21
  72. data/.travis.yml +0 -49
  73. data/Manifest.txt +0 -72
  74. data/Rakefile.cross +0 -298
  75. data/translation/.po4a-version +0 -7
  76. data/translation/po/all.pot +0 -936
  77. data/translation/po/ja.po +0 -1036
  78. data/translation/po4a.cfg +0 -12
@@ -5,6 +5,9 @@ require 'ipaddr'
5
5
 
6
6
  module PG
7
7
  module TextEncoder
8
+ # This is a encoder class for conversion of Ruby IPAddr values to PostgreSQL inet type.
9
+ #
10
+ # As soon as this class is used, it requires the ruby standard library 'ipaddr'.
8
11
  class Inet < SimpleEncoder
9
12
  def encode(value)
10
13
  case value
@@ -5,6 +5,9 @@ require 'json'
5
5
 
6
6
  module PG
7
7
  module TextEncoder
8
+ # This is a encoder class for conversion of Ruby Hash, Array, String, Numeric, nil values to PostgreSQL JSON/JSONB type.
9
+ #
10
+ # As soon as this class is used, it requires the ruby standard library 'json'.
8
11
  class JSON < SimpleEncoder
9
12
  def encode(value)
10
13
  ::JSON.generate(value, quirks_mode: true)
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.5.4'
3
+ VERSION = '1.6.1'
4
4
  end
data/lib/pg.rb CHANGED
@@ -6,11 +6,12 @@
6
6
  module PG
7
7
 
8
8
  # Is this file part of a fat binary gem with bundled libpq?
9
- bundled_libpq_path = File.join(__dir__, RUBY_PLATFORM.gsub(/^i386-/, "x86-"))
10
- if File.exist?(bundled_libpq_path)
9
+ # This path must be enabled by add_dll_directory on Windows.
10
+ gplat = Gem::Platform.local
11
+ bundled_libpq_path = Dir[File.expand_path("../ports/#{gplat.cpu}-#{gplat.os}*/lib", __dir__)].first
12
+ if bundled_libpq_path
11
13
  POSTGRESQL_LIB_PATH = bundled_libpq_path
12
14
  else
13
- bundled_libpq_path = nil
14
15
  # Try to load libpq path as found by extconf.rb
15
16
  begin
16
17
  require "pg/postgresql_lib_path"
@@ -22,7 +23,8 @@ module PG
22
23
  end
23
24
 
24
25
  add_dll_path = proc do |path, &block|
25
- if RUBY_PLATFORM =~/(mswin|mingw)/i && path && File.exist?(path)
26
+ if RUBY_PLATFORM =~/(mswin|mingw)/i && path
27
+ BUNDLED_LIBPQ_WITH_UNIXSOCKET = false
26
28
  begin
27
29
  require 'ruby_installer/runtime'
28
30
  RubyInstaller::Runtime.add_dll_directory(path, &block)
@@ -33,19 +35,21 @@ module PG
33
35
  ENV['PATH'] = old_path
34
36
  end
35
37
  else
36
- # No need to set a load path manually - it's set as library rpath.
38
+ # libpq is found by a relative rpath in the cross compiled extension dll
39
+ # or by the system library loader
37
40
  block.call
41
+ BUNDLED_LIBPQ_WITH_UNIXSOCKET = RUBY_PLATFORM=~/linux/i && PG::IS_BINARY_GEM
38
42
  end
39
43
  end
40
44
 
41
45
  # Add a load path to the one retrieved from pg_config
42
46
  add_dll_path.call(POSTGRESQL_LIB_PATH) do
43
- if bundled_libpq_path
44
- # It's a Windows binary gem, try the <major>.<minor> subdirectory
47
+ begin
48
+ # Try the <major>.<minor> subdirectory for fat binary gems
45
49
  major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or
46
50
  raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}"
47
51
  require "#{major_minor}/pg_ext"
48
- else
52
+ rescue LoadError
49
53
  require 'pg_ext'
50
54
  end
51
55
  end
@@ -111,6 +115,7 @@ module PG
111
115
  require 'pg/coder'
112
116
  require 'pg/type_map_by_column'
113
117
  require 'pg/connection'
118
+ require 'pg/cancel_connection'
114
119
  require 'pg/result'
115
120
  require 'pg/tuple'
116
121
  autoload :VERSION, 'pg/version'
@@ -126,4 +131,14 @@ module PG
126
131
  Warning.extend(TruffleFixWarn)
127
132
  end
128
133
 
134
+ # Ruby-3.4+ prints a warning, if bigdecimal is required but not in the Gemfile.
135
+ # But it's a false positive, since we enable bigdecimal depending features only if it's available.
136
+ # And most people don't need these features.
137
+ def self.require_bigdecimal_without_warning
138
+ oldverb, $VERBOSE = $VERBOSE, nil
139
+ require "bigdecimal"
140
+ ensure
141
+ $VERBOSE = oldverb
142
+ end
143
+
129
144
  end # module PG
@@ -0,0 +1,9 @@
1
+ FROM yugabytedb/yugabyte:2024.1.0.0-b129
2
+
3
+ WORKDIR /app
4
+
5
+ RUN yugabyted cert generate_server_certs --hostnames=127.0.0.1 --base_dir=.
6
+
7
+ ENTRYPOINT ["yugabyted"]
8
+ CMD ["start", "--background", "false", "--ui", "false", "--tserver_flags", "use_client_to_server_encryption=true,cert_node_filename=127.0.0.1,certs_dir=/app/generated_certs/127.0.0.1"]
9
+ VOLUME /app
@@ -0,0 +1,28 @@
1
+ services:
2
+ yb:
3
+ build: .
4
+ container_name: yb
5
+ ports:
6
+ - "127.0.0.1:5433:5433"
7
+ volumes:
8
+ - certs:/app/generated_certs
9
+ healthcheck:
10
+ test: 'ysqlsh -h $$(hostname) -c \\conninfo || exit 1;'
11
+ interval: 2s
12
+ timeout: 30s
13
+ retries: 20
14
+ start_period: 10s
15
+
16
+ pg:
17
+ image: ruby:3.0
18
+ working_dir: /app
19
+ volumes:
20
+ - .:/app
21
+ - certs:/generated_certs
22
+ command: bash -c "gem inst pg-*.gem && ruby pg-test.rb"
23
+ depends_on:
24
+ yb:
25
+ condition: service_healthy
26
+
27
+ volumes:
28
+ certs:
@@ -0,0 +1,45 @@
1
+ require 'pg'
2
+
3
+ conn = PG.connect(
4
+ host: 'yb',
5
+ port: 5433,
6
+ user: 'yugabyte',
7
+ dbname: 'yugabyte',
8
+ sslmode: 'require',
9
+ sslrootcert: 'app/generated_certs/127.0.0.1/ca.crt',
10
+ sslcert: 'app/generated_certs/127.0.0.1/node.127.0.0.1.crt',
11
+ sslkey: 'app/generated_certs/127.0.0.1/node.127.0.0.1.key'
12
+ )
13
+
14
+ $stdout.sync = true
15
+ # fd = File.open("pg_trace.log", "a+")
16
+ # conn.trace(fd)
17
+
18
+ begin
19
+ # Validate connection is working
20
+ res = conn.exec("SELECT version();")
21
+ res.each_row do |row|
22
+ puts "You are connected to: #{row[0]}"
23
+ end
24
+ # 53*511
25
+ # 53*767
26
+ # 53*1023
27
+ # 53*1279
28
+ # 7*1817
29
+ # 11*1487
30
+ # 13*1363
31
+ # 16*1211
32
+ # 18*1128
33
+ # 22*1984
34
+ # 27*1723
35
+
36
+ (22..53).each do |m|
37
+ (1..2048).each do |l|
38
+ hanging_query = "SELECT lpad(''::text, #{m}, '0') FROM generate_series(1, #{l});"
39
+ puts "Executing hanging query: #{hanging_query}"
40
+ conn.exec(hanging_query)
41
+ end
42
+ end
43
+ ensure
44
+ conn.close if conn
45
+ end
data/pg.gemspec CHANGED
@@ -10,20 +10,24 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["ged@FaerieMUD.org", "lars@greiz-reinsdorf.de"]
11
11
 
12
12
  spec.summary = "Pg is the Ruby interface to the PostgreSQL RDBMS"
13
- spec.description = "Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL 9.3 and later."
13
+ spec.description = "Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL 10 and later."
14
14
  spec.homepage = "https://github.com/ged/ruby-pg"
15
15
  spec.license = "BSD-2-Clause"
16
- spec.required_ruby_version = ">= 2.5"
16
+ spec.required_ruby_version = ">= 2.7"
17
17
 
18
18
  spec.metadata["homepage_uri"] = spec.homepage
19
19
  spec.metadata["source_code_uri"] = "https://github.com/ged/ruby-pg"
20
- spec.metadata["changelog_uri"] = "https://github.com/ged/ruby-pg/blob/master/History.md"
20
+ spec.metadata["changelog_uri"] = "https://github.com/ged/ruby-pg/blob/master/CHANGELOG.md"
21
21
  spec.metadata["documentation_uri"] = "http://deveiate.org/code/pg"
22
+ # https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#msys2-library-dependency
23
+ spec.metadata["msys2_mingw_dependencies"] = "postgresql"
22
24
 
23
25
  # Specify which files should be added to the gem when it is released.
24
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
27
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
28
+ `git ls-files -z`.split("\x0").reject do |f|
29
+ f.match(%r{\A(?:test|spec|features|translation|\.)})
30
+ end
27
31
  end
28
32
  spec.extensions = ["ext/extconf.rb"]
29
33
  spec.require_paths = ["lib"]
@@ -0,0 +1,30 @@
1
+ From e82c1b395162ea71279ea2170259383082e41ab0 Mon Sep 17 00:00:00 2001
2
+ From: Lars Kanis <lars@greiz-reinsdorf.de>
3
+ Date: Sat, 12 Jul 2025 10:55:17 +0200
4
+ Subject: [PATCH] Allow static linking krb5 library
5
+
6
+ Otherwise it fails with:
7
+ Undefined symbols for architecture arm64:
8
+ "_krb5int_c_mit_des_zeroblock", referenced from:
9
+ _krb5int_des3_cbc_encrypt in libk5crypto.a(d3_aead.o)
10
+ _krb5int_des3_cbc_decrypt in libk5crypto.a(d3_aead.o)
11
+ ---
12
+ src/lib/crypto/builtin/des/des_int.h | 2 +-
13
+ 1 file changed, 1 insertion(+), 1 deletion(-)
14
+
15
+ diff --git a/src/lib/crypto/builtin/des/des_int.h b/src/lib/crypto/builtin/des/des_int.h
16
+ index 46fed7dbd..114e48ebd 100644
17
+ --- a/lib/crypto/builtin/des/des_int.h
18
+ +++ b/lib/crypto/builtin/des/des_int.h
19
+ @@ -159,7 +159,7 @@ mit_des_cbc_encrypt(const mit_des_cblock *in, mit_des_cblock *out,
20
+ const mit_des_cblock ivec, int enc);
21
+
22
+ #define mit_des_zeroblock krb5int_c_mit_des_zeroblock
23
+ -extern const mit_des_cblock mit_des_zeroblock;
24
+ +const mit_des_cblock mit_des_zeroblock;
25
+
26
+ /* fin_rndkey.c */
27
+ krb5_error_code mit_des_finish_random_key(const krb5_encrypt_block *,
28
+ --
29
+ 2.43.0
30
+
@@ -0,0 +1,21 @@
1
+ --- a/Configurations/10-main.conf
2
+ +++ b/Configurations/10-main.conf
3
+ @@ -1603,6 +1603,18 @@
4
+ multilib => "64",
5
+ },
6
+
7
+ + "mingwarm64" => {
8
+ + inherit_from => [ "mingw-common" ],
9
+ + cflags => "",
10
+ + sys_id => "MINGWARM64",
11
+ + bn_ops => add("SIXTY_FOUR_BIT"),
12
+ + asm_arch => 'aarch64',
13
+ + uplink_arch => 'armv8',
14
+ + perlasm_scheme => "win64",
15
+ + shared_rcflag => "",
16
+ + multilib => "-arm64",
17
+ + },
18
+ +
19
+ #### UEFI
20
+ "UEFI" => {
21
+ inherit_from => [ "BASE_unix" ],
@@ -0,0 +1,42 @@
1
+ From 746e8e250b265c40d9706f26560e02e8623f123f Mon Sep 17 00:00:00 2001
2
+ From: Lars Kanis <lars@greiz-reinsdorf.de>
3
+ Date: Fri, 31 Jan 2025 21:58:00 +0100
4
+ Subject: [PATCH] Use workaround of __builtin_setjmp only on MINGW on MSVCRT
5
+
6
+ Because it is not present on ARM64 on Windows and not necessary on any UCRT based toolchain.
7
+ ---
8
+ src/include/c.h | 10 +++++-----
9
+ 1 file changed, 5 insertions(+), 5 deletions(-)
10
+
11
+ diff --git a/src/include/c.h b/src/include/c.h
12
+ index a14c631516..33792c860c 100644
13
+ --- a/src/include/c.h
14
+ +++ b/src/include/c.h
15
+ @@ -1312,19 +1312,19 @@ extern int fdatasync(int fildes);
16
+ /*
17
+ * When there is no sigsetjmp, its functionality is provided by plain
18
+ * setjmp. We now support the case only on Windows. However, it seems
19
+ - * that MinGW-64 has some longstanding issues in its setjmp support,
20
+ - * so on that toolchain we cheat and use gcc's builtins.
21
+ + * that MinGW-64 on x86_64 has some longstanding issues in its setjmp
22
+ + * support, so on that toolchain we cheat and use gcc's builtins.
23
+ */
24
+ #ifdef WIN32
25
+ -#ifdef __MINGW64__
26
+ +#if defined(__MINGW64__) && !defined(_UCRT)
27
+ typedef intptr_t sigjmp_buf[5];
28
+ #define sigsetjmp(x,y) __builtin_setjmp(x)
29
+ #define siglongjmp __builtin_longjmp
30
+ -#else /* !__MINGW64__ */
31
+ +#else /* !defined(__MINGW64__) || defined(_UCRT) */
32
+ #define sigjmp_buf jmp_buf
33
+ #define sigsetjmp(x,y) setjmp(x)
34
+ #define siglongjmp longjmp
35
+ -#endif /* __MINGW64__ */
36
+ +#endif /* defined(__MINGW64__) && !defined(_UCRT) */
37
+ #endif /* WIN32 */
38
+
39
+ /* /port compatibility functions */
40
+ --
41
+ 2.43.0
42
+
@@ -0,0 +1,52 @@
1
+ From ab793829a4ce473f1cc2bbc0e2a6f6753553255d Mon Sep 17 00:00:00 2001
2
+ From: Lars Kanis <lars@greiz-reinsdorf.de>
3
+ Date: Sun, 8 Sep 2024 13:59:05 +0200
4
+ Subject: [PATCH] libpq: Process buffered SSL read bytes to support records
5
+ >8kB on async API
6
+
7
+ The async API of libpq doesn't support SSL record sizes >8kB so far.
8
+ This size isn't exceeded by vanilla PostgreSQL, but by other products using
9
+ the postgres wire protocol 3.
10
+ PQconsumeInput() reads all data readable from the socket, so that the read
11
+ condition is cleared.
12
+ But it doesn't process all the data that is pending on the SSL layer.
13
+ Also a subsequent call to PQisBusy() doesn't process it, so that the client
14
+ is triggered to wait for more readable data on the socket.
15
+ But this never arrives, so that the connection blocks infinitely.
16
+
17
+ To fix this issue call pqReadData() repeatedly until there is no buffered
18
+ SSL data left to be read.
19
+
20
+ The synchronous libpq API isn't affected, since it supports arbitrary SSL
21
+ record sizes already.
22
+ ---
23
+ src/interfaces/libpq/fe-exec.c | 13 +++++++++++++
24
+ 1 file changed, 13 insertions(+)
25
+
26
+ diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
27
+ index 0d224a852..637894ee1 100644
28
+ --- a/src/interfaces/libpq/fe-exec.c
29
+ +++ b/src/interfaces/libpq/fe-exec.c
30
+ @@ -2006,6 +2006,19 @@ PQconsumeInput(PGconn *conn)
31
+ if (pqReadData(conn) < 0)
32
+ return 0;
33
+
34
+ + #ifdef USE_SSL
35
+ + /*
36
+ + * Ensure all buffered read bytes in the SSL library are processed,
37
+ + * which might be not the case, if the SSL record size exceeds 8k.
38
+ + * Otherwise parseInput can't process the data.
39
+ + */
40
+ + while (conn->ssl_in_use && pgtls_read_pending(conn))
41
+ + {
42
+ + if (pqReadData(conn) < 0)
43
+ + return 0;
44
+ + }
45
+ + #endif
46
+ +
47
+ /* Parsing of the data waits till later. */
48
+ return 1;
49
+ }
50
+ --
51
+ 2.43.0
52
+
@@ -0,0 +1,64 @@
1
+ require 'bundler'
2
+ require 'bundler/gem_helper'
3
+
4
+ class PgGemHelper < Bundler::GemHelper
5
+ attr_accessor :cross_platforms
6
+
7
+ def install
8
+ super
9
+
10
+ task "release:guard_clean" => ["release:update_history"]
11
+
12
+ task "release:update_history" do
13
+ update_history
14
+ end
15
+
16
+ task "release:rubygem_push" => ["gem:native"]
17
+ end
18
+
19
+ def hfile
20
+ "CHANGELOG.md"
21
+ end
22
+
23
+ def headline
24
+ '^([^\n]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
25
+ end
26
+
27
+ def reldate
28
+ Time.now.strftime("%Y-%m-%d")
29
+ end
30
+
31
+ def update_history
32
+ hin = File.read(hfile)
33
+ hout = hin.sub(/#{headline}/) do
34
+ raise "#{hfile} isn't up-to-date for version #{version} (!= #{$2})" unless $2==version.to_s
35
+ $1 + $2 + $3 + reldate + $5
36
+ end
37
+ if hout != hin
38
+ Bundler.ui.confirm "Updating #{hfile} for release."
39
+ File.write(hfile, hout)
40
+ Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
41
+ end
42
+ end
43
+
44
+ def tag_version
45
+ Bundler.ui.confirm "Tag release with annotation:"
46
+ m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
47
+ Bundler.ui.info(m[:annotation].gsub(/^/, " "))
48
+ IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
49
+ fd.write m[:annotation]
50
+ end
51
+ yield if block_given?
52
+ rescue
53
+ Bundler.ui.error "Untagging #{version_tag} due to error."
54
+ Rake::FileUtilsExt.sh "git", "tag", "-d", version_tag
55
+ raise
56
+ end
57
+
58
+ def rubygem_push(path)
59
+ cross_platforms.each do |ruby_platform|
60
+ super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
61
+ end
62
+ super(path)
63
+ end
64
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,39 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
8
8
  - Lars Kanis
9
- autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
11
  - |
13
12
  -----BEGIN CERTIFICATE-----
14
- MIIDLjCCAhagAwIBAgIBCzANBgkqhkiG9w0BAQsFADA9MQ4wDAYDVQQDDAVrYW5p
15
- czEXMBUGCgmSJomT8ixkARkWB2NvbWNhcmQxEjAQBgoJkiaJk/IsZAEZFgJkZTAe
16
- Fw0yMzA0MjgwOTI0NDhaFw0yNDA0MjcwOTI0NDhaMD0xDjAMBgNVBAMMBWthbmlz
17
- MRcwFQYKCZImiZPyLGQBGRYHY29tY2FyZDESMBAGCgmSJomT8ixkARkWAmRlMIIB
18
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApop+rNmg35bzRugZ21VMGqI6
19
- HGzPLO4VHYncWn/xmgPU/ZMcZdfj6MzIaZJ/czXyt4eHpBk1r8QOV3gBXnRXEjVW
20
- 9xi+EdVOkTV2/AVFKThcbTAQGiF/bT1n2M+B1GTybRzMg6hyhOJeGPqIhLfJEpxn
21
- lJi4+ENAVT4MpqHEAGB8yFoPC0GqiOHQsdHxQV3P3c2OZqG+yJey74QtwA2tLcLn
22
- Q53c63+VLGsOjODl1yPn/2ejyq8qWu6ahfTxiIlSar2UbwtaQGBDFdb2CXgEufXT
23
- L7oaPxlmj+Q2oLOfOnInd2Oxop59HoJCQPsg8f921J43NCQGA8VHK6paxIRDLQID
24
- AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUvgTdT7fe
25
- x17ugO3IOsjEJwW7KP4wDQYJKoZIhvcNAQELBQADggEBACAxNXwfMGG7paZjnG/c
26
- smdi/ocW2GmCNtILaSzDZqlD5LoA68MiO7u5vwWyBaDJ6giUB330VJoGRbWMxvxN
27
- JU6Bnwa4yYp9YtF91wYIi7FXwIrCPKd9bk3bf4M5wECdsv+zvVceq2zRXqD7fci8
28
- 1LRG8ort/f4TgaT7B4aNwOaabA2UT6u0FGeglqxLkhir86MY3QQyBfJZUoTKWGkz
29
- S9a7GXsYpe+8HMOaE4+SZp8SORKPgATND5m/4VdzuO59VXjE5UP7QpXigbxAt7H7
30
- ciK5Du2ZDhowmWzZwNzR7VvVmfAK6RQJlRB03VkkQRWGld5yApOrYDne6WbD8kE0
31
- uM8=
13
+ MIIEBDCCAmygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
14
+ L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDEyMjkxOTU2NTZaFw0yNTEy
15
+ MjkxOTU2NTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
16
+ PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
17
+ mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
18
+ eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
19
+ 8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
20
+ SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
21
+ JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
22
+ eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
23
+ chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
24
+ 9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
25
+ A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
26
+ 7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEAoZZWzNV2XXaoSmvyamSSN+Wt/Ia+DNrU
27
+ 2pc3kMEqykH6l1WiVPszr6HavQ//2I2UcSRSS5AGDdiSXcfyFmHtMBdtJHhTPcn7
28
+ 4DLliB0szpvwG+ltGD8PI8eWkLaTQeFzs+0QCTavgKV+Zw56Q0J5zZvHHUMrLkUD
29
+ qhwKjdTdkrRTn9Sqi0BrIRRZGTUDdrt8qoWm35aES5arKZzytgrRD/kXfFW2LCg0
30
+ FzgTKibR4/3g8ph94kQLg/D2SMlVPkQ3ECi036mZxDC2n8V6u3rDkG5923wmrRZB
31
+ J6cqz475Q8HYORQCB68OPzkWMfC7mBo3vpSsIqRoNs1FE4FJu4FGwZG8fBSrDC4H
32
+ bZe+GtyS3e2SMjgT65zp35gLO9I7MquzYN9P6V2u1iBpTycchk5z9R1ghxzZSBT8
33
+ DrkJ9tVlPQtJB0LqT0tvBap4upnwT1xYq721b5dwH6AF4Pi6iz/dc5vnq1/MH8bV
34
+ 8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
32
35
  -----END CERTIFICATE-----
33
- date: 2023-09-01 00:00:00.000000000 Z
36
+ date: 1980-01-02 00:00:00.000000000 Z
34
37
  dependencies: []
35
38
  description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
36
- 9.3 and later.
39
+ 10 and later.
37
40
  email:
38
41
  - ged@FaerieMUD.org
39
42
  - lars@greiz-reinsdorf.de
@@ -41,8 +44,8 @@ executables: []
41
44
  extensions:
42
45
  - ext/extconf.rb
43
46
  extra_rdoc_files:
47
+ - CHANGELOG.md
44
48
  - Contributors.rdoc
45
- - History.md
46
49
  - README-OS_X.rdoc
47
50
  - README-Windows.rdoc
48
51
  - README.ja.md
@@ -53,6 +56,7 @@ extra_rdoc_files:
53
56
  - ext/pg.h
54
57
  - ext/pg_binary_decoder.c
55
58
  - ext/pg_binary_encoder.c
59
+ - ext/pg_cancel_connection.c
56
60
  - ext/pg_coder.c
57
61
  - ext/pg_connection.c
58
62
  - ext/pg_copy_coder.c
@@ -79,6 +83,7 @@ extra_rdoc_files:
79
83
  - lib/pg/binary_decoder/date.rb
80
84
  - lib/pg/binary_decoder/timestamp.rb
81
85
  - lib/pg/binary_encoder/timestamp.rb
86
+ - lib/pg/cancel_connection.rb
82
87
  - lib/pg/coder.rb
83
88
  - lib/pg/connection.rb
84
89
  - lib/pg/exceptions.rb
@@ -97,34 +102,22 @@ extra_rdoc_files:
97
102
  - lib/pg/type_map_by_column.rb
98
103
  - lib/pg/version.rb
99
104
  files:
100
- - ".appveyor.yml"
101
- - ".gems"
102
- - ".gemtest"
103
- - ".github/workflows/binary-gems.yml"
104
- - ".github/workflows/source-gem.yml"
105
- - ".gitignore"
106
- - ".hgsigs"
107
- - ".hgtags"
108
- - ".irbrc"
109
- - ".pryrc"
110
- - ".tm_properties"
111
- - ".travis.yml"
112
105
  - BSDL
106
+ - CHANGELOG.md
113
107
  - Contributors.rdoc
114
108
  - Gemfile
115
- - History.md
116
109
  - LICENSE
117
- - Manifest.txt
118
110
  - POSTGRES
119
111
  - README-OS_X.rdoc
120
112
  - README-Windows.rdoc
121
113
  - README.ja.md
122
114
  - README.md
123
115
  - Rakefile
124
- - Rakefile.cross
125
116
  - certs/ged.pem
117
+ - certs/kanis@comcard.de.pem
126
118
  - certs/larskanis-2022.pem
127
119
  - certs/larskanis-2023.pem
120
+ - certs/larskanis-2024.pem
128
121
  - ext/errorcodes.def
129
122
  - ext/errorcodes.rb
130
123
  - ext/errorcodes.txt
@@ -135,6 +128,7 @@ files:
135
128
  - ext/pg.h
136
129
  - ext/pg_binary_decoder.c
137
130
  - ext/pg_binary_encoder.c
131
+ - ext/pg_cancel_connection.c
138
132
  - ext/pg_coder.c
139
133
  - ext/pg_connection.c
140
134
  - ext/pg_copy_coder.c
@@ -164,6 +158,7 @@ files:
164
158
  - lib/pg/binary_decoder/date.rb
165
159
  - lib/pg/binary_decoder/timestamp.rb
166
160
  - lib/pg/binary_encoder/timestamp.rb
161
+ - lib/pg/cancel_connection.rb
167
162
  - lib/pg/coder.rb
168
163
  - lib/pg/connection.rb
169
164
  - lib/pg/exceptions.rb
@@ -192,7 +187,15 @@ files:
192
187
  - misc/ruby-pg/README.txt
193
188
  - misc/ruby-pg/Rakefile
194
189
  - misc/ruby-pg/lib/ruby/pg.rb
190
+ - misc/yugabyte/Dockerfile
191
+ - misc/yugabyte/docker-compose.yml
192
+ - misc/yugabyte/pg-test.rb
195
193
  - pg.gemspec
194
+ - ports/patches/krb5/1.21.3/0001-Allow-static-linking-krb5-library.patch
195
+ - ports/patches/openssl/3.5.1/0001-aarch64-mingw.patch
196
+ - ports/patches/postgresql/17.5/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch
197
+ - ports/patches/postgresql/17.5/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch
198
+ - rakelib/pg_gem_helper.rb
196
199
  - rakelib/task_extension.rb
197
200
  - sample/array_insert.rb
198
201
  - sample/async_api.rb
@@ -213,19 +216,15 @@ files:
213
216
  - sample/test_binary_values.rb
214
217
  - sample/wal_shipper.rb
215
218
  - sample/warehouse_partitions.rb
216
- - translation/.po4a-version
217
- - translation/po/all.pot
218
- - translation/po/ja.po
219
- - translation/po4a.cfg
220
219
  homepage: https://github.com/ged/ruby-pg
221
220
  licenses:
222
221
  - BSD-2-Clause
223
222
  metadata:
224
223
  homepage_uri: https://github.com/ged/ruby-pg
225
224
  source_code_uri: https://github.com/ged/ruby-pg
226
- changelog_uri: https://github.com/ged/ruby-pg/blob/master/History.md
225
+ changelog_uri: https://github.com/ged/ruby-pg/blob/master/CHANGELOG.md
227
226
  documentation_uri: http://deveiate.org/code/pg
228
- post_install_message:
227
+ msys2_mingw_dependencies: postgresql
229
228
  rdoc_options:
230
229
  - "--main"
231
230
  - README.md
@@ -237,15 +236,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
237
236
  requirements:
238
237
  - - ">="
239
238
  - !ruby/object:Gem::Version
240
- version: '2.5'
239
+ version: '2.7'
241
240
  required_rubygems_version: !ruby/object:Gem::Requirement
242
241
  requirements:
243
242
  - - ">="
244
243
  - !ruby/object:Gem::Version
245
244
  version: '0'
246
245
  requirements: []
247
- rubygems_version: 3.4.15
248
- signing_key:
246
+ rubygems_version: 3.7.1
249
247
  specification_version: 4
250
248
  summary: Pg is the Ruby interface to the PostgreSQL RDBMS
251
249
  test_files: []
metadata.gz.sig CHANGED
Binary file
data/.appveyor.yml DELETED
@@ -1,42 +0,0 @@
1
- image: Visual Studio 2022
2
-
3
- init:
4
- - set PATH=C:/Ruby%ruby_version%/bin;c:/Program Files/Git/cmd;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files/Mercurial
5
- - set RUBYOPT=--verbose
6
- install:
7
- - ps: |
8
- if ($env:RUBYDOWNLOAD -ne $null) {
9
- $(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-$env:RUBYDOWNLOAD.exe", "$pwd/ruby-setup.exe")
10
- cmd /c ruby-setup.exe /currentuser /verysilent /dir=C:/Ruby$env:ruby_version
11
- }
12
- - cmd: |
13
- ridk enable
14
- c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-pkgconf ${MINGW_PACKAGE_PREFIX}-libyaml ${MINGW_PACKAGE_PREFIX}-gcc"
15
- - ruby --version
16
- - gem --version
17
- - gem install bundler --conservative
18
- - bundle install
19
- - ps: |
20
- if ($env:PGVERSION -ne $null)
21
- {
22
- $(new-object net.webclient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-' + $env:PGVERSION + '.exe', 'C:/postgresql-setup.exe')
23
- cmd /c "C:/postgresql-setup.exe" --mode unattended --extract-only 1
24
-
25
- $env:PATH = 'C:/Program Files/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
26
- $env:PATH = 'C:/Program Files (x86)/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
27
- } else {
28
- c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed `${MINGW_PACKAGE_PREFIX}-postgresql"
29
- }
30
- - echo %PATH%
31
- - pg_config
32
- build_script:
33
- - bundle exec rake -rdevkit compile --trace
34
- test_script:
35
- - bundle exec rake test PG_DEBUG=0
36
- on_failure:
37
- - find -name mkmf.log | xargs cat
38
- environment:
39
- matrix:
40
- - ruby_version: "head"
41
- RUBYDOWNLOAD: x86
42
- - ruby_version: "30-x64"