pg 0.18.2-x64-mingw32 → 0.18.3-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +409 -261
- data/History.rdoc +13 -0
- data/README-Windows.rdoc +15 -26
- data/README.rdoc +2 -1
- data/Rakefile +2 -0
- data/Rakefile.cross +36 -20
- data/ext/pg.c +1 -1
- data/ext/pg_binary_decoder.c +1 -1
- data/ext/pg_binary_encoder.c +1 -1
- data/ext/pg_connection.c +5 -5
- data/ext/pg_result.c +1 -1
- data/ext/pg_text_decoder.c +1 -1
- data/ext/pg_text_encoder.c +1 -1
- data/ext/pg_type_map.c +1 -1
- data/ext/pg_type_map_all_strings.c +1 -1
- data/ext/pg_type_map_by_class.c +1 -1
- data/ext/pg_type_map_by_column.c +1 -1
- data/ext/pg_type_map_by_mri_type.c +1 -1
- data/ext/pg_type_map_by_oid.c +1 -1
- data/ext/pg_type_map_in_ruby.c +1 -1
- data/ext/util.c +2 -2
- data/lib/2.0/pg_ext.so +0 -0
- data/lib/2.1/pg_ext.so +0 -0
- data/lib/2.2/pg_ext.so +0 -0
- data/lib/pg.rb +2 -2
- data/lib/pg/basic_type_mapping.rb +35 -35
- data/lib/pg/text_decoder.rb +3 -1
- data/lib/x64-mingw32/libpq.dll +0 -0
- data/sample/disk_usage_report.rb +1 -1
- data/sample/pg_statistics.rb +1 -1
- data/sample/replication_monitor.rb +1 -1
- data/spec/helpers.rb +1 -1
- data/spec/pg/basic_type_mapping_spec.rb +4 -4
- data/spec/pg/connection_spec.rb +5 -2
- data/spec/pg/type_spec.rb +2 -0
- metadata +74 -10
- metadata.gz.sig +0 -0
data/lib/pg/text_decoder.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'date'
|
4
|
+
|
3
5
|
module PG
|
4
6
|
module TextDecoder
|
5
7
|
class Date < SimpleDecoder
|
@@ -7,7 +9,7 @@ module PG
|
|
7
9
|
|
8
10
|
def decode(string, tuple=nil, field=nil)
|
9
11
|
if string =~ ISO_DATE
|
10
|
-
|
12
|
+
::Date.new $1.to_i, $2.to_i, $3.to_i
|
11
13
|
else
|
12
14
|
string
|
13
15
|
end
|
data/lib/x64-mingw32/libpq.dll
CHANGED
Binary file
|
data/sample/disk_usage_report.rb
CHANGED
data/sample/pg_statistics.rb
CHANGED
@@ -36,7 +36,7 @@ end
|
|
36
36
|
###
|
37
37
|
class PGMonitor
|
38
38
|
|
39
|
-
VERSION = %q$Id$
|
39
|
+
VERSION = %q$Id: replication_monitor.rb,v 36ca5b412583 2012/04/17 23:32:25 mahlon $
|
40
40
|
|
41
41
|
# When to consider a slave as 'behind', measured in WAL segments.
|
42
42
|
# The default WAL segment size is 16, so we'll alert after
|
data/spec/helpers.rb
CHANGED
@@ -255,7 +255,7 @@ module PG::TestingHelpers
|
|
255
255
|
unless conns.empty?
|
256
256
|
puts "Lingering connections remain:"
|
257
257
|
conns.each do |row|
|
258
|
-
puts " [%
|
258
|
+
puts " [%s] {%s} %s -- %s" % row.values_at( 'pid', 'state', 'application_name', 'query' )
|
259
259
|
end
|
260
260
|
end
|
261
261
|
end
|
@@ -58,8 +58,8 @@ describe 'Basic type mapping' do
|
|
58
58
|
it "should do OID based type conversions", :ruby_19 do
|
59
59
|
res = @conn.exec( "SELECT 1, 'a', 2.0::FLOAT, TRUE, '2013-06-30'::DATE, generate_series(4,5)" )
|
60
60
|
expect( res.map_types!(basic_type_mapping).values ).to eq( [
|
61
|
-
[ 1, 'a', 2.0, true,
|
62
|
-
[ 1, 'a', 2.0, true,
|
61
|
+
[ 1, 'a', 2.0, true, Date.new(2013,6,30), 4 ],
|
62
|
+
[ 1, 'a', 2.0, true, Date.new(2013,6,30), 5 ],
|
63
63
|
] )
|
64
64
|
end
|
65
65
|
|
@@ -159,8 +159,8 @@ describe 'Basic type mapping' do
|
|
159
159
|
CAST('1913-12-31' AS DATE),
|
160
160
|
CAST('infinity' AS DATE),
|
161
161
|
CAST('-infinity' AS DATE)", [], format )
|
162
|
-
expect( res.getvalue(0,0) ).to eq(
|
163
|
-
expect( res.getvalue(0,1) ).to eq(
|
162
|
+
expect( res.getvalue(0,0) ).to eq( Date.new(2113, 12, 31) )
|
163
|
+
expect( res.getvalue(0,1) ).to eq( Date.new(1913, 12, 31) )
|
164
164
|
expect( res.getvalue(0,2) ).to eq( 'infinity' )
|
165
165
|
expect( res.getvalue(0,3) ).to eq( '-infinity' )
|
166
166
|
end
|
data/spec/pg/connection_spec.rb
CHANGED
@@ -228,11 +228,14 @@ describe PG::Connection do
|
|
228
228
|
expect( @conn.db ).to eq( "test" )
|
229
229
|
expect( @conn.user ).to be_a_kind_of( String )
|
230
230
|
expect( @conn.pass ).to eq( "" )
|
231
|
-
expect( @conn.host ).to eq( "localhost" )
|
232
231
|
expect( @conn.port ).to eq( 54321 )
|
233
232
|
expect( @conn.tty ).to eq( "" )
|
234
233
|
expect( @conn.options ).to eq( "" )
|
235
234
|
end
|
235
|
+
it "can retrieve it's connection parameters for the established connection",
|
236
|
+
skip: RUBY_PLATFORM=~/x64-mingw/ ? "host segfaults on Windows-x64" : false do
|
237
|
+
expect( @conn.host ).to eq( "localhost" )
|
238
|
+
end
|
236
239
|
|
237
240
|
EXPECTED_TRACE_OUTPUT = %{
|
238
241
|
To backend> Msg Q
|
@@ -705,7 +708,7 @@ describe PG::Connection do
|
|
705
708
|
it "can return the default connection options as a Hash" do
|
706
709
|
expect( described_class.conndefaults_hash ).to be_a( Hash )
|
707
710
|
expect( described_class.conndefaults_hash ).to include( :user, :password, :dbname, :host, :port )
|
708
|
-
expect(
|
711
|
+
expect( ['5432', '54321'] ).to include( described_class.conndefaults_hash[:port] )
|
709
712
|
expect( @conn.conndefaults_hash ).to eq( described_class.conndefaults_hash )
|
710
713
|
end
|
711
714
|
|
data/spec/pg/type_spec.rb
CHANGED
@@ -512,6 +512,7 @@ describe "PG::Type derivations" do
|
|
512
512
|
expect( e.encode("xxxx") ).to eq("eHh4eA==")
|
513
513
|
expect( e.encode("xxxxx") ).to eq("eHh4eHg=")
|
514
514
|
expect( e.encode("\0\n\t") ).to eq("AAoJ")
|
515
|
+
expect( e.encode("(\xFBm") ).to eq("KPtt")
|
515
516
|
end
|
516
517
|
|
517
518
|
it "should encode Strings as base64 in BinaryDecoder" do
|
@@ -540,6 +541,7 @@ describe "PG::Type derivations" do
|
|
540
541
|
expect( e.decode("eHh4eA==") ).to eq("xxxx")
|
541
542
|
expect( e.decode("eHh4eHg=") ).to eq("xxxxx")
|
542
543
|
expect( e.decode("AAoJ") ).to eq("\0\n\t")
|
544
|
+
expect( e.decode("KPtt") ).to eq("(\xFBm")
|
543
545
|
end
|
544
546
|
|
545
547
|
it "should decode base64 in BinaryEncoder" do
|
metadata
CHANGED
@@ -1,16 +1,80 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.3
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
8
8
|
- Lars Kanis
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
|
11
|
+
cert_chain:
|
12
|
+
- |
|
13
|
+
-----BEGIN CERTIFICATE-----
|
14
|
+
MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MQwwCgYDVQQDDANnZWQx
|
15
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
|
16
|
+
HhcNMTUwNDAxMjEyNDEzWhcNMTYwMzMxMjEyNDEzWjA+MQwwCgYDVQQDDANnZWQx
|
17
|
+
GTAXBgoJkiaJk/IsZAEZFglGYWVyaWVNVUQxEzARBgoJkiaJk/IsZAEZFgNvcmcw
|
18
|
+
ggEiMA0GCSqGSIb3DQEBAQUAA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000 Z
|
13
35
|
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: hoe-mercurial
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '1.4'
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.4'
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: hoe-deveiate
|
52
|
+
requirement: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0.7'
|
57
|
+
type: :development
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.7'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: hoe-highline
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0.2'
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0.2'
|
14
78
|
- !ruby/object:Gem::Dependency
|
15
79
|
name: rdoc
|
16
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -40,33 +104,33 @@ dependencies:
|
|
40
104
|
- !ruby/object:Gem::Version
|
41
105
|
version: '0.9'
|
42
106
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
107
|
+
name: rake-compiler-dock
|
44
108
|
requirement: !ruby/object:Gem::Requirement
|
45
109
|
requirements:
|
46
110
|
- - "~>"
|
47
111
|
- !ruby/object:Gem::Version
|
48
|
-
version: '3
|
112
|
+
version: '0.3'
|
49
113
|
type: :development
|
50
114
|
prerelease: false
|
51
115
|
version_requirements: !ruby/object:Gem::Requirement
|
52
116
|
requirements:
|
53
117
|
- - "~>"
|
54
118
|
- !ruby/object:Gem::Version
|
55
|
-
version: '3
|
119
|
+
version: '0.3'
|
56
120
|
- !ruby/object:Gem::Dependency
|
57
|
-
name: hoe
|
121
|
+
name: hoe
|
58
122
|
requirement: !ruby/object:Gem::Requirement
|
59
123
|
requirements:
|
60
124
|
- - "~>"
|
61
125
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
126
|
+
version: '3.12'
|
63
127
|
type: :development
|
64
128
|
prerelease: false
|
65
129
|
version_requirements: !ruby/object:Gem::Requirement
|
66
130
|
requirements:
|
67
131
|
- - "~>"
|
68
132
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
133
|
+
version: '3.12'
|
70
134
|
- !ruby/object:Gem::Dependency
|
71
135
|
name: hoe-bundler
|
72
136
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
332
|
version: '0'
|
269
333
|
requirements: []
|
270
334
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.4.
|
335
|
+
rubygems_version: 2.4.8
|
272
336
|
signing_key:
|
273
337
|
specification_version: 4
|
274
338
|
summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
|
metadata.gz.sig
ADDED
Binary file
|