pg 1.6.1 → 1.6.3
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +26 -0
- data/Gemfile +4 -4
- data/README.md +11 -9
- data/Rakefile +6 -20
- data/ext/errorcodes.def +9 -0
- data/ext/errorcodes.rb +1 -1
- data/ext/errorcodes.txt +8 -1
- data/ext/extconf.rb +39 -9
- data/ext/pg.h +6 -4
- data/ext/pg_binary_decoder.c +1 -1
- data/ext/pg_binary_encoder.c +2 -2
- data/ext/pg_connection.c +22 -2
- data/ext/pg_result.c +96 -42
- data/ext/pg_text_decoder.c +1 -1
- data/ext/pg_text_encoder.c +2 -2
- data/ext/pg_tuple.c +6 -6
- data/ext/pg_type_map.c +3 -1
- data/ext/pg_util.c +2 -2
- data/ext/pg_util.h +2 -2
- data/lib/pg/version.rb +2 -1
- data/lib/pg.rb +156 -135
- data/misc/glibc/Dockerfile +20 -0
- data/misc/glibc/docker-compose.yml +9 -0
- data/misc/glibc/glibc_spec.rb +5 -0
- data/ports/patches/krb5/1.22.1/0002-unknown-command-line-option-on-clang.patch +12 -0
- data.tar.gz.sig +0 -0
- metadata +22 -18
- metadata.gz.sig +0 -0
- /data/ports/patches/krb5/{1.21.3 → 1.22.1}/0001-Allow-static-linking-krb5-library.patch +0 -0
- /data/ports/patches/openssl/{3.5.1 → 3.5.2}/0001-aarch64-mingw.patch +0 -0
- /data/ports/patches/postgresql/{17.5 → 18.1}/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch +0 -0
- /data/ports/patches/postgresql/{17.5 → 18.1}/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch +0 -0
data/lib/pg.rb
CHANGED
|
@@ -5,140 +5,161 @@
|
|
|
5
5
|
# The top-level PG namespace.
|
|
6
6
|
module PG
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
8
|
+
# Is this file part of a fat binary gem with bundled libpq?
|
|
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
|
|
13
|
+
POSTGRESQL_LIB_PATH = bundled_libpq_path
|
|
14
|
+
else
|
|
15
|
+
# Try to load libpq path as found by extconf.rb
|
|
16
|
+
begin
|
|
17
|
+
require "pg/postgresql_lib_path"
|
|
18
|
+
rescue LoadError
|
|
19
|
+
# rake-compiler doesn't use regular "make install", but uses it's own install tasks.
|
|
20
|
+
# It therefore doesn't copy pg/postgresql_lib_path.rb in case of "rake compile".
|
|
21
|
+
POSTGRESQL_LIB_PATH = false
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
POSTGRESQL_LIB_PATH.freeze
|
|
25
|
+
|
|
26
|
+
add_dll_path = proc do |path, &block|
|
|
27
|
+
if RUBY_PLATFORM =~/(mswin|mingw)/i && path
|
|
28
|
+
BUNDLED_LIBPQ_WITH_UNIXSOCKET = false
|
|
29
|
+
begin
|
|
30
|
+
require 'ruby_installer/runtime'
|
|
31
|
+
RubyInstaller::Runtime.add_dll_directory(path, &block)
|
|
32
|
+
rescue LoadError
|
|
33
|
+
old_path = ENV['PATH']
|
|
34
|
+
ENV['PATH'] = "#{path};#{old_path}"
|
|
35
|
+
block.call
|
|
36
|
+
ENV['PATH'] = old_path
|
|
37
|
+
end
|
|
38
|
+
else
|
|
39
|
+
# libpq is found by a relative rpath in the cross compiled extension dll
|
|
40
|
+
# or by the system library loader
|
|
41
|
+
block.call
|
|
42
|
+
BUNDLED_LIBPQ_WITH_UNIXSOCKET = RUBY_PLATFORM=~/linux/i && PG::IS_BINARY_GEM
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Add a load path to the one retrieved from pg_config
|
|
47
|
+
add_dll_path.call(POSTGRESQL_LIB_PATH) do
|
|
48
|
+
begin
|
|
49
|
+
# Try the <major>.<minor> subdirectory for fat binary gems
|
|
50
|
+
major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or
|
|
51
|
+
raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}"
|
|
52
|
+
require "#{major_minor}/pg_ext"
|
|
53
|
+
rescue LoadError => error1
|
|
54
|
+
begin
|
|
55
|
+
require 'pg_ext'
|
|
56
|
+
rescue LoadError => error2
|
|
57
|
+
msg = <<~EOT
|
|
58
|
+
pg's C extension failed to load:
|
|
59
|
+
#{error1}
|
|
60
|
+
#{error2}
|
|
61
|
+
EOT
|
|
62
|
+
if msg =~ /GLIBC/
|
|
63
|
+
msg += <<~EOT
|
|
64
|
+
|
|
65
|
+
The GLIBC version of this system seems too old. Please use the source version of pg:
|
|
66
|
+
gem uninstall pg --all
|
|
67
|
+
gem install pg --platform ruby
|
|
68
|
+
or in your Gemfile:
|
|
69
|
+
gem "pg", force_ruby_platform: true
|
|
70
|
+
See also: https://deveiate.org/code/pg/README_md.html#label-Source+gem
|
|
71
|
+
EOT
|
|
72
|
+
end
|
|
73
|
+
raise error2, msg
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Get the PG library version.
|
|
79
|
+
#
|
|
80
|
+
# +include_buildnum+ is no longer used and any value passed will be ignored.
|
|
81
|
+
def self.version_string( include_buildnum=nil )
|
|
82
|
+
"%s %s" % [ self.name, VERSION ]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### Convenience alias for PG::Connection.new.
|
|
87
|
+
def self.connect( *args, &block )
|
|
88
|
+
Connection.new( *args, &block )
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if defined?(Ractor.make_shareable)
|
|
92
|
+
def self.make_shareable(obj)
|
|
93
|
+
Ractor.make_shareable(obj)
|
|
94
|
+
end
|
|
95
|
+
else
|
|
96
|
+
def self.make_shareable(obj)
|
|
97
|
+
obj.freeze
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
module BinaryDecoder
|
|
102
|
+
%i[ TimestampUtc TimestampUtcToLocal TimestampLocal ].each do |klass|
|
|
103
|
+
autoload klass, 'pg/binary_decoder/timestamp'
|
|
104
|
+
end
|
|
105
|
+
autoload :Date, 'pg/binary_decoder/date'
|
|
106
|
+
end
|
|
107
|
+
module BinaryEncoder
|
|
108
|
+
%i[ TimestampUtc TimestampLocal ].each do |klass|
|
|
109
|
+
autoload klass, 'pg/binary_encoder/timestamp'
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
module TextDecoder
|
|
113
|
+
%i[ TimestampUtc TimestampUtcToLocal TimestampLocal TimestampWithoutTimeZone TimestampWithTimeZone ].each do |klass|
|
|
114
|
+
autoload klass, 'pg/text_decoder/timestamp'
|
|
115
|
+
end
|
|
116
|
+
autoload :Date, 'pg/text_decoder/date'
|
|
117
|
+
autoload :Inet, 'pg/text_decoder/inet'
|
|
118
|
+
autoload :JSON, 'pg/text_decoder/json'
|
|
119
|
+
autoload :Numeric, 'pg/text_decoder/numeric'
|
|
120
|
+
end
|
|
121
|
+
module TextEncoder
|
|
122
|
+
%i[ TimestampUtc TimestampWithoutTimeZone TimestampWithTimeZone ].each do |klass|
|
|
123
|
+
autoload klass, 'pg/text_encoder/timestamp'
|
|
124
|
+
end
|
|
125
|
+
autoload :Date, 'pg/text_encoder/date'
|
|
126
|
+
autoload :Inet, 'pg/text_encoder/inet'
|
|
127
|
+
autoload :JSON, 'pg/text_encoder/json'
|
|
128
|
+
autoload :Numeric, 'pg/text_encoder/numeric'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
autoload :BasicTypeMapBasedOnResult, 'pg/basic_type_map_based_on_result'
|
|
132
|
+
autoload :BasicTypeMapForQueries, 'pg/basic_type_map_for_queries'
|
|
133
|
+
autoload :BasicTypeMapForResults, 'pg/basic_type_map_for_results'
|
|
134
|
+
autoload :BasicTypeRegistry, 'pg/basic_type_registry'
|
|
135
|
+
require 'pg/exceptions'
|
|
136
|
+
require 'pg/coder'
|
|
137
|
+
require 'pg/type_map_by_column'
|
|
138
|
+
require 'pg/connection'
|
|
139
|
+
require 'pg/cancel_connection'
|
|
140
|
+
require 'pg/result'
|
|
141
|
+
require 'pg/tuple'
|
|
142
|
+
autoload :VERSION, 'pg/version'
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
# Avoid "uninitialized constant Truffle::WarningOperations" on Truffleruby up to 22.3.1
|
|
146
|
+
if RUBY_ENGINE=="truffleruby" && !defined?(Truffle::WarningOperations)
|
|
147
|
+
module TruffleFixWarn
|
|
148
|
+
def warn(str, category=nil)
|
|
149
|
+
super(str)
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
Warning.extend(TruffleFixWarn)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Ruby-3.4+ prints a warning, if bigdecimal is required but not in the Gemfile.
|
|
156
|
+
# But it's a false positive, since we enable bigdecimal depending features only if it's available.
|
|
157
|
+
# And most people don't need these features.
|
|
158
|
+
def self.require_bigdecimal_without_warning
|
|
159
|
+
oldverb, $VERBOSE = $VERBOSE, nil
|
|
160
|
+
require "bigdecimal"
|
|
161
|
+
ensure
|
|
162
|
+
$VERBOSE = oldverb
|
|
163
|
+
end
|
|
143
164
|
|
|
144
165
|
end # module PG
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
FROM debian:10.13
|
|
2
|
+
|
|
3
|
+
WORKDIR /pg
|
|
4
|
+
|
|
5
|
+
# Debian 10.13 is EOL now:
|
|
6
|
+
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
|
|
7
|
+
|
|
8
|
+
RUN apt-get update && apt-get install ruby git wget gcc make libz-dev libffi-dev libreadline-dev libyaml-dev libssl-dev -y
|
|
9
|
+
|
|
10
|
+
ENV RBENV_ROOT=/usr/local/rbenv
|
|
11
|
+
|
|
12
|
+
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
|
13
|
+
git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
|
14
|
+
$RBENV_ROOT/bin/rbenv init
|
|
15
|
+
|
|
16
|
+
RUN $RBENV_ROOT/bin/rbenv install 3.3.9 -- --disable-install-doc
|
|
17
|
+
RUN /usr/local/rbenv/versions/3.3.9/bin/gem inst rspec
|
|
18
|
+
|
|
19
|
+
CMD /usr/local/rbenv/versions/3.3.9/bin/gem inst --local pg-*.gem && \
|
|
20
|
+
/usr/local/rbenv/versions/3.3.9/bin/rspec glibc_spec.rb
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
diff --git a/src/lib/krb5/krb/deltat.c b/src/lib/krb5/krb/deltat.c
|
|
2
|
+
index 03145c854..34cdf969e 100644
|
|
3
|
+
--- a/lib/krb5/krb/deltat.c
|
|
4
|
+
+++ b/lib/krb5/krb/deltat.c
|
|
5
|
+
@@ -44,7 +44,6 @@
|
|
6
|
+
#ifdef __GNUC__
|
|
7
|
+
#pragma GCC diagnostic push
|
|
8
|
+
#pragma GCC diagnostic ignored "-Wuninitialized"
|
|
9
|
+
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
#include "k5-int.h"
|
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.6.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Granger
|
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
|
10
10
|
cert_chain:
|
|
11
11
|
- |
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MIIEBDCCAmygAwIBAgIBBDANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
|
|
14
|
+
L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNTEyMjkyMDMyMzFaFw0yNjEy
|
|
15
|
+
MjkyMDMyMzFaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
|
|
16
16
|
PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
|
|
17
17
|
mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
|
|
18
18
|
eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
|
|
@@ -23,15 +23,15 @@ cert_chain:
|
|
|
23
23
|
chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
|
|
24
24
|
9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
|
|
25
25
|
A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEAUVIier9xybHmXNsj801xD+Q7Jz7wpRsf
|
|
27
|
+
fMHpV2sAzvYcAa7pn+mbu9nf7RUhe5hiaUv88Usk9nRUYYrjBOO5RuD+wYNowpcE
|
|
28
|
+
kxUiTAP/fgUBdW6hYUJy57CH3xUD6tj1Cg9hxdKy7jItZXbfhX+qPq2BwGaXz7gn
|
|
29
|
+
nhrALITRmpuPnlsccM94dgSArCInSo2SEc12h2oB6FAnFG1Lre3dmQamI5q1EKp0
|
|
30
|
+
Yafb2+cPbFcVYUdE50wf+cdeGDOsCGlAmo2OGqXWxTP2hIfyhsFoamD6UGufLoPG
|
|
31
|
+
Dh6tAEZIuEvLjq93qoNceUQn+xxiiIszjY5mkTu9rVY+/gh5PJzu9IHvyIqBpb2o
|
|
32
|
+
fdWDISWK+KSLCrqkFtKoliLDTZau73GcYCVOkjca+3cxqABKZ+M8r42Sq8JPxPiv
|
|
33
|
+
KyLQBzqPeLN9qRDD1bEFHIcgwdY/zQTs4mWRBSmBWa7w+k8nP8aSV1dN/fvhYwY3
|
|
34
|
+
HCQwtPaMYOznIOcc8shL4zLJpcl8uCqE
|
|
35
35
|
-----END CERTIFICATE-----
|
|
36
36
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
37
37
|
dependencies: []
|
|
@@ -176,6 +176,9 @@ files:
|
|
|
176
176
|
- lib/pg/tuple.rb
|
|
177
177
|
- lib/pg/type_map_by_column.rb
|
|
178
178
|
- lib/pg/version.rb
|
|
179
|
+
- misc/glibc/Dockerfile
|
|
180
|
+
- misc/glibc/docker-compose.yml
|
|
181
|
+
- misc/glibc/glibc_spec.rb
|
|
179
182
|
- misc/openssl-pg-segfault.rb
|
|
180
183
|
- misc/postgres/History.txt
|
|
181
184
|
- misc/postgres/Manifest.txt
|
|
@@ -191,10 +194,11 @@ files:
|
|
|
191
194
|
- misc/yugabyte/docker-compose.yml
|
|
192
195
|
- misc/yugabyte/pg-test.rb
|
|
193
196
|
- pg.gemspec
|
|
194
|
-
- ports/patches/krb5/1.
|
|
195
|
-
- ports/patches/
|
|
196
|
-
- ports/patches/
|
|
197
|
-
- ports/patches/postgresql/
|
|
197
|
+
- ports/patches/krb5/1.22.1/0001-Allow-static-linking-krb5-library.patch
|
|
198
|
+
- ports/patches/krb5/1.22.1/0002-unknown-command-line-option-on-clang.patch
|
|
199
|
+
- ports/patches/openssl/3.5.2/0001-aarch64-mingw.patch
|
|
200
|
+
- ports/patches/postgresql/18.1/0001-Use-workaround-of-__builtin_setjmp-only-on-MINGW-on-.patch
|
|
201
|
+
- ports/patches/postgresql/18.1/0001-libpq-Process-buffered-SSL-read-bytes-to-support-rec.patch
|
|
198
202
|
- rakelib/pg_gem_helper.rb
|
|
199
203
|
- rakelib/task_extension.rb
|
|
200
204
|
- sample/array_insert.rb
|
|
@@ -243,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
243
247
|
- !ruby/object:Gem::Version
|
|
244
248
|
version: '0'
|
|
245
249
|
requirements: []
|
|
246
|
-
rubygems_version: 3.
|
|
250
|
+
rubygems_version: 3.6.9
|
|
247
251
|
specification_version: 4
|
|
248
252
|
summary: Pg is the Ruby interface to the PostgreSQL RDBMS
|
|
249
253
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|