pg 1.3.0 → 1.3.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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +15 -0
- data/ext/pg_connection.c +5 -9
- data/lib/pg/connection.rb +2 -1
- data/lib/pg/version.rb +1 -1
- data/lib/pg.rb +7 -5
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 066fc0a1f6e951b395f258798f382417c51be61dba5c3999ef6712bb793dc138
|
4
|
+
data.tar.gz: a8944c0abae70b7996067dec9a613f750d8cffbbd69e75ab8c35759a36cada53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c689ccbb0410d6b704144e18d8fb5cf747599f8ad0d84be1d265374f568a9a44b77be6542a36f6c7acdb8dbf862c352e0b0de3d576be82e6d1599801fb7546f0
|
7
|
+
data.tar.gz: e0be5c3b24a89b294f1c7762d027f424670b191437db0f35ee74994389e15a5059899740c137918c25eb50906ee1a8979a9c5fcd67a72ff3b69519d1b096229f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
== v1.3.1 [YYYY-MM-DD] Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
Bugfixes:
|
4
|
+
|
5
|
+
- Fix wrong handling of socket writability on Windows introduced in #417.
|
6
|
+
This caused starvation in conn.put_copy_data.
|
7
|
+
- Fix error in PG.version_string(true). #419
|
8
|
+
- Fix a regression in pg 1.3.0 where Ruby 2.x busy-looping any fractional seconds for every wait. #420
|
9
|
+
|
10
|
+
Enhancements:
|
11
|
+
|
12
|
+
- Raise an error when conn.copy_data is used in nonblocking mode.
|
13
|
+
|
14
|
+
|
1
15
|
== v1.3.0 [2022-01-20] Michael Granger <ged@FaerieMUD.org>
|
2
16
|
|
3
17
|
Install Enhancements:
|
@@ -65,6 +79,7 @@ Deprecated:
|
|
65
79
|
Removed:
|
66
80
|
- Remove support of ruby-2.2, 2.3 and 2.4. Minimum is ruby-2.5 now.
|
67
81
|
- Remove support for PostgreSQL-9.2. Minimum is PostgreSQL-9.3 now.
|
82
|
+
- Remove constant PG::REVISION, which was broken since pg-1.1.4.
|
68
83
|
|
69
84
|
Repository:
|
70
85
|
- Replace Hoe by Bundler for gem packaging
|
data/ext/pg_connection.c
CHANGED
@@ -2241,19 +2241,15 @@ pg_rb_thread_io_wait(VALUE io, VALUE events, VALUE timeout) {
|
|
2241
2241
|
GetOpenFile((io), fptr);
|
2242
2242
|
if( !NIL_P(timeout) ){
|
2243
2243
|
ptimeout.tv_sec = (time_t)(NUM2DBL(timeout));
|
2244
|
-
ptimeout.tv_usec = (time_t)(NUM2DBL(timeout) - (double)ptimeout.tv_sec);
|
2244
|
+
ptimeout.tv_usec = (time_t)((NUM2DBL(timeout) - (double)ptimeout.tv_sec) * 1e6);
|
2245
2245
|
|
2246
2246
|
gettimeofday(&currtime, NULL);
|
2247
2247
|
timeradd(&currtime, &ptimeout, &aborttime);
|
2248
2248
|
}
|
2249
2249
|
|
2250
|
-
if(rb_events & PG_RUBY_IO_READABLE)
|
2251
|
-
|
2252
|
-
|
2253
|
-
w32_events |= FD_WRITE | FD_CONNECT;
|
2254
|
-
} else if(rb_events & PG_RUBY_IO_PRIORITY) {
|
2255
|
-
w32_events |= FD_OOB;
|
2256
|
-
}
|
2250
|
+
if(rb_events & PG_RUBY_IO_READABLE) w32_events |= FD_READ | FD_ACCEPT | FD_CLOSE;
|
2251
|
+
if(rb_events & PG_RUBY_IO_WRITABLE) w32_events |= FD_WRITE | FD_CONNECT;
|
2252
|
+
if(rb_events & PG_RUBY_IO_PRIORITY) w32_events |= FD_OOB;
|
2257
2253
|
|
2258
2254
|
for(;;) {
|
2259
2255
|
if ( WSAEventSelect(_get_osfhandle(fptr->fd), hEvent, w32_events) == SOCKET_ERROR ) {
|
@@ -2336,7 +2332,7 @@ pg_rb_io_wait(VALUE io, VALUE events, VALUE timeout) {
|
|
2336
2332
|
GetOpenFile((io), fptr);
|
2337
2333
|
if( !NIL_P(timeout) ){
|
2338
2334
|
waittime.tv_sec = (time_t)(NUM2DBL(timeout));
|
2339
|
-
waittime.tv_usec = (time_t)(NUM2DBL(timeout) - (double)waittime.tv_sec);
|
2335
|
+
waittime.tv_usec = (time_t)((NUM2DBL(timeout) - (double)waittime.tv_sec) * 1e6);
|
2340
2336
|
}
|
2341
2337
|
res = rb_wait_for_single_fd(fptr->fd, NUM2UINT(events), NIL_P(timeout) ? NULL : &waittime);
|
2342
2338
|
|
data/lib/pg/connection.rb
CHANGED
@@ -241,6 +241,7 @@ class PG::Connection
|
|
241
241
|
# ["more", "data", "to", "copy"]
|
242
242
|
|
243
243
|
def copy_data( sql, coder=nil )
|
244
|
+
raise PG::NotInBlockingMode, "copy_data can not be used in nonblocking mode" if nonblocking?
|
244
245
|
res = exec( sql )
|
245
246
|
|
246
247
|
case res.result_status
|
@@ -385,7 +386,7 @@ class PG::Connection
|
|
385
386
|
# If the optional code block is given, it will be passed <i>result</i> as an argument,
|
386
387
|
# and the PG::Result object will automatically be cleared when the block terminates.
|
387
388
|
# In this instance, <code>conn.exec</code> returns the value of the block.
|
388
|
-
def get_result
|
389
|
+
def get_result
|
389
390
|
block
|
390
391
|
sync_get_result
|
391
392
|
end
|
data/lib/pg/version.rb
CHANGED
data/lib/pg.rb
CHANGED
@@ -53,12 +53,14 @@ module PG
|
|
53
53
|
|
54
54
|
class NotAllCopyDataRetrieved < PG::Error
|
55
55
|
end
|
56
|
+
class NotInBlockingMode < PG::Error
|
57
|
+
end
|
56
58
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
return
|
59
|
+
# Get the PG library version.
|
60
|
+
#
|
61
|
+
# +include_buildnum+ is no longer used and any value passed will be ignored.
|
62
|
+
def self::version_string( include_buildnum=nil )
|
63
|
+
return "%s %s" % [ self.name, VERSION ]
|
62
64
|
end
|
63
65
|
|
64
66
|
|
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
P5YP5BAbNW+gvd3QHRiWTTuhgHrdDnGdXg93N2M5KHn1ug8BtPLQwlcFwEpKnlLn
|
35
35
|
btEP+7EplFuoiMfd
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2022-01
|
37
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
38
38
|
dependencies: []
|
39
39
|
description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
|
40
40
|
9.3 and later.
|
metadata.gz.sig
CHANGED
Binary file
|