pg_jruby 0.14.1.rc2-java → 0.17.1-java
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.tar.gz.sig +2 -0
- data/BSDL +22 -0
- data/ChangeLog +0 -0
- data/Contributors.rdoc +45 -0
- data/History.rdoc +270 -0
- data/LICENSE +56 -0
- data/Manifest.txt +51 -5
- data/POSTGRES +23 -0
- data/README-OS_X.rdoc +68 -0
- data/README-Windows.rdoc +67 -0
- data/README.ja.rdoc +14 -0
- data/README.rdoc +52 -94
- data/Rakefile +181 -73
- data/Rakefile.cross +273 -0
- data/ext/errorcodes.def +931 -0
- data/ext/errorcodes.rb +99 -0
- data/ext/errorcodes.txt +463 -0
- data/ext/extconf.rb +97 -0
- data/ext/gvl_wrappers.c +13 -0
- data/ext/gvl_wrappers.h +253 -0
- data/ext/pg.c +545 -0
- data/ext/pg.h +156 -0
- data/ext/pg_connection.c +3643 -0
- data/ext/pg_errors.c +89 -0
- data/ext/pg_result.c +920 -0
- data/ext/vc/pg.sln +26 -0
- data/ext/vc/pg_18/pg.vcproj +216 -0
- data/ext/vc/pg_19/pg_19.vcproj +209 -0
- data/lib/pg.rb +12 -18
- data/lib/pg/connection.rb +117 -10
- data/lib/pg/exceptions.rb +2 -8
- data/lib/pg/result.rb +6 -1
- data/lib/pg_ext.jar +0 -0
- data/sample/array_insert.rb +20 -0
- data/sample/async_api.rb +106 -0
- data/sample/async_copyto.rb +39 -0
- data/sample/async_mixed.rb +56 -0
- data/sample/check_conn.rb +21 -0
- data/sample/copyfrom.rb +81 -0
- data/sample/copyto.rb +19 -0
- data/sample/cursor.rb +21 -0
- data/sample/disk_usage_report.rb +186 -0
- data/sample/issue-119.rb +94 -0
- data/sample/losample.rb +69 -0
- data/sample/minimal-testcase.rb +17 -0
- data/sample/notify_wait.rb +72 -0
- data/sample/pg_statistics.rb +294 -0
- data/sample/replication_monitor.rb +231 -0
- data/sample/test_binary_values.rb +33 -0
- data/sample/wal_shipper.rb +434 -0
- data/sample/warehouse_partitions.rb +320 -0
- data/spec/data/expected_trace.out +26 -0
- data/spec/data/random_binary_data +0 -0
- data/spec/lib/helpers.rb +350 -0
- data/spec/pg/connection_spec.rb +1276 -0
- data/spec/pg/result_spec.rb +345 -0
- data/spec/pg_spec.rb +44 -0
- metadata +136 -90
- metadata.gz.sig +0 -0
- data/CHANGELOG.rdoc +0 -7
- data/bin/pg +0 -3
@@ -0,0 +1,345 @@
|
|
1
|
+
#!/usr/bin/env rspec
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
BEGIN {
|
5
|
+
require 'pathname'
|
6
|
+
|
7
|
+
basedir = Pathname( __FILE__ ).dirname.parent.parent
|
8
|
+
libdir = basedir + 'lib'
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
11
|
+
$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
|
12
|
+
}
|
13
|
+
|
14
|
+
require 'rspec'
|
15
|
+
require 'spec/lib/helpers'
|
16
|
+
require 'pg'
|
17
|
+
|
18
|
+
describe PG::Result do
|
19
|
+
|
20
|
+
before( :all ) do
|
21
|
+
@conn = setup_testing_db( "PG_Result" )
|
22
|
+
end
|
23
|
+
|
24
|
+
before( :each ) do
|
25
|
+
@conn.exec( 'BEGIN' )
|
26
|
+
end
|
27
|
+
|
28
|
+
after( :each ) do
|
29
|
+
@conn.exec( 'ROLLBACK' )
|
30
|
+
end
|
31
|
+
|
32
|
+
after( :all ) do
|
33
|
+
teardown_testing_db( @conn )
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
#
|
38
|
+
# Examples
|
39
|
+
#
|
40
|
+
|
41
|
+
it "should act as an array of hashes" do
|
42
|
+
res = @conn.exec("SELECT 1 AS a, 2 AS b")
|
43
|
+
res[0]['a'].should== '1'
|
44
|
+
res[0]['b'].should== '2'
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should yield a row as an array" do
|
48
|
+
res = @conn.exec("SELECT 1 AS a, 2 AS b")
|
49
|
+
list = []
|
50
|
+
res.each_row { |r| list << r }
|
51
|
+
list.should eq [['1', '2']]
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should insert nil AS NULL and return NULL as nil" do
|
55
|
+
res = @conn.exec("SELECT $1::int AS n", [nil])
|
56
|
+
res[0]['n'].should be_nil()
|
57
|
+
end
|
58
|
+
|
59
|
+
it "encapsulates errors in a PGError object" do
|
60
|
+
exception = nil
|
61
|
+
begin
|
62
|
+
@conn.exec( "SELECT * FROM nonexistant_table" )
|
63
|
+
rescue PGError => err
|
64
|
+
exception = err
|
65
|
+
end
|
66
|
+
|
67
|
+
result = exception.result
|
68
|
+
|
69
|
+
result.should be_a( described_class() )
|
70
|
+
result.error_field( PG::PG_DIAG_SEVERITY ).should == 'ERROR'
|
71
|
+
result.error_field( PG::PG_DIAG_SQLSTATE ).should == '42P01'
|
72
|
+
result.error_field( PG::PG_DIAG_MESSAGE_PRIMARY ).
|
73
|
+
should == 'relation "nonexistant_table" does not exist'
|
74
|
+
result.error_field( PG::PG_DIAG_MESSAGE_DETAIL ).should be_nil()
|
75
|
+
result.error_field( PG::PG_DIAG_MESSAGE_HINT ).should be_nil()
|
76
|
+
result.error_field( PG::PG_DIAG_STATEMENT_POSITION ).should == '15'
|
77
|
+
result.error_field( PG::PG_DIAG_INTERNAL_POSITION ).should be_nil()
|
78
|
+
result.error_field( PG::PG_DIAG_INTERNAL_QUERY ).should be_nil()
|
79
|
+
result.error_field( PG::PG_DIAG_CONTEXT ).should be_nil()
|
80
|
+
result.error_field( PG::PG_DIAG_SOURCE_FILE ).should =~ /parse_relation\.c$|namespace\.c$/
|
81
|
+
result.error_field( PG::PG_DIAG_SOURCE_LINE ).should =~ /^\d+$/
|
82
|
+
result.error_field( PG::PG_DIAG_SOURCE_FUNCTION ).should =~ /^parserOpenTable$|^RangeVarGetRelid$/
|
83
|
+
end
|
84
|
+
|
85
|
+
it "encapsulates database object names for integrity constraint violations", :postgresql_93 do
|
86
|
+
@conn.exec( "CREATE TABLE integrity (id SERIAL PRIMARY KEY)" )
|
87
|
+
exception = nil
|
88
|
+
begin
|
89
|
+
@conn.exec( "INSERT INTO integrity VALUES (NULL)" )
|
90
|
+
rescue PGError => err
|
91
|
+
exception = err
|
92
|
+
end
|
93
|
+
result = exception.result
|
94
|
+
|
95
|
+
result.error_field( PG::PG_DIAG_SCHEMA_NAME ).should == 'public'
|
96
|
+
result.error_field( PG::PG_DIAG_TABLE_NAME ).should == 'integrity'
|
97
|
+
result.error_field( PG::PG_DIAG_COLUMN_NAME ).should == 'id'
|
98
|
+
result.error_field( PG::PG_DIAG_DATATYPE_NAME ).should be_nil
|
99
|
+
result.error_field( PG::PG_DIAG_CONSTRAINT_NAME ).should be_nil
|
100
|
+
end
|
101
|
+
|
102
|
+
it "should detect division by zero as SQLSTATE 22012" do
|
103
|
+
sqlstate = nil
|
104
|
+
begin
|
105
|
+
res = @conn.exec("SELECT 1/0")
|
106
|
+
rescue PGError => e
|
107
|
+
sqlstate = e.result.result_error_field( PG::PG_DIAG_SQLSTATE ).to_i
|
108
|
+
end
|
109
|
+
sqlstate.should == 22012
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should return the same bytes in binary format that are sent in binary format" do
|
113
|
+
binary_file = File.join(Dir.pwd, 'spec/data', 'random_binary_data')
|
114
|
+
bytes = File.open(binary_file, 'rb').read
|
115
|
+
res = @conn.exec('VALUES ($1::bytea)',
|
116
|
+
[ { :value => bytes, :format => 1 } ], 1)
|
117
|
+
res[0]['column1'].should== bytes
|
118
|
+
res.getvalue(0,0).should == bytes
|
119
|
+
res.values[0][0].should == bytes
|
120
|
+
res.column_values(0)[0].should == bytes
|
121
|
+
end
|
122
|
+
|
123
|
+
it "should return the same bytes in binary format that are sent as inline text" do
|
124
|
+
binary_file = File.join(Dir.pwd, 'spec/data', 'random_binary_data')
|
125
|
+
bytes = File.open(binary_file, 'rb').read
|
126
|
+
@conn.exec("SET standard_conforming_strings=on")
|
127
|
+
res = @conn.exec("VALUES ('#{PG::Connection.escape_bytea(bytes)}'::bytea)", [], 1)
|
128
|
+
res[0]['column1'].should == bytes
|
129
|
+
res.getvalue(0,0).should == bytes
|
130
|
+
res.values[0][0].should == bytes
|
131
|
+
res.column_values(0)[0].should == bytes
|
132
|
+
end
|
133
|
+
|
134
|
+
it "should return the same bytes in text format that are sent in binary format" do
|
135
|
+
binary_file = File.join(Dir.pwd, 'spec/data', 'random_binary_data')
|
136
|
+
bytes = File.open(binary_file, 'rb').read
|
137
|
+
res = @conn.exec('VALUES ($1::bytea)',
|
138
|
+
[ { :value => bytes, :format => 1 } ])
|
139
|
+
PG::Connection.unescape_bytea(res[0]['column1']).should== bytes
|
140
|
+
end
|
141
|
+
|
142
|
+
it "should return the same bytes in text format that are sent as inline text" do
|
143
|
+
binary_file = File.join(Dir.pwd, 'spec/data', 'random_binary_data')
|
144
|
+
in_bytes = File.open(binary_file, 'rb').read
|
145
|
+
|
146
|
+
out_bytes = nil
|
147
|
+
@conn.exec("SET standard_conforming_strings=on")
|
148
|
+
res = @conn.exec("VALUES ('#{PG::Connection.escape_bytea(in_bytes)}'::bytea)", [], 0)
|
149
|
+
out_bytes = PG::Connection.unescape_bytea(res[0]['column1'])
|
150
|
+
out_bytes.should == in_bytes
|
151
|
+
end
|
152
|
+
|
153
|
+
it "should return the parameter type of the specified prepared statement parameter", :postgresql_92 do
|
154
|
+
query = 'SELECT * FROM pg_stat_activity WHERE user = $1::name AND query = $2::text'
|
155
|
+
@conn.prepare( 'queryfinder', query )
|
156
|
+
res = @conn.describe_prepared( 'queryfinder' )
|
157
|
+
|
158
|
+
@conn.exec( 'SELECT format_type($1, -1)', [res.paramtype(0)] ).getvalue( 0, 0 ).
|
159
|
+
should == 'name'
|
160
|
+
@conn.exec( 'SELECT format_type($1, -1)', [res.paramtype(1)] ).getvalue( 0, 0 ).
|
161
|
+
should == 'text'
|
162
|
+
end
|
163
|
+
|
164
|
+
it "should raise an exception when a negative index is given to #fformat" do
|
165
|
+
res = @conn.exec('SELECT * FROM pg_stat_activity')
|
166
|
+
expect {
|
167
|
+
res.fformat( -1 )
|
168
|
+
}.to raise_error( ArgumentError, /column number/i )
|
169
|
+
end
|
170
|
+
|
171
|
+
it "should raise an exception when a negative index is given to #fmod" do
|
172
|
+
res = @conn.exec('SELECT * FROM pg_stat_activity')
|
173
|
+
expect {
|
174
|
+
res.fmod( -1 )
|
175
|
+
}.to raise_error( ArgumentError, /column number/i )
|
176
|
+
end
|
177
|
+
|
178
|
+
it "should raise an exception when a negative index is given to #[]" do
|
179
|
+
res = @conn.exec('SELECT * FROM pg_stat_activity')
|
180
|
+
expect {
|
181
|
+
res[ -1 ]
|
182
|
+
}.to raise_error( IndexError, /-1 is out of range/i )
|
183
|
+
end
|
184
|
+
|
185
|
+
it "should raise allow for conversion to an array of arrays" do
|
186
|
+
@conn.exec( 'CREATE TABLE valuestest ( foo varchar(33) )' )
|
187
|
+
@conn.exec( 'INSERT INTO valuestest ("foo") values (\'bar\')' )
|
188
|
+
@conn.exec( 'INSERT INTO valuestest ("foo") values (\'bar2\')' )
|
189
|
+
|
190
|
+
res = @conn.exec( 'SELECT * FROM valuestest' )
|
191
|
+
res.values.should == [ ["bar"], ["bar2"] ]
|
192
|
+
end
|
193
|
+
|
194
|
+
# PQfmod
|
195
|
+
it "can return the type modifier for a result column" do
|
196
|
+
@conn.exec( 'CREATE TABLE fmodtest ( foo varchar(33) )' )
|
197
|
+
res = @conn.exec( 'SELECT * FROM fmodtest' )
|
198
|
+
res.fmod( 0 ).should == 33 + 4 # Column length + varlena size (4)
|
199
|
+
end
|
200
|
+
|
201
|
+
it "should raise an exception when an invalid index is passed to PG::Result#fmod" do
|
202
|
+
@conn.exec( 'CREATE TABLE fmodtest ( foo varchar(33) )' )
|
203
|
+
res = @conn.exec( 'SELECT * FROM fmodtest' )
|
204
|
+
expect { res.fmod(1) }.to raise_error( ArgumentError )
|
205
|
+
end
|
206
|
+
|
207
|
+
it "should raise an exception when an invalid (negative) index is passed to PG::Result#fmod" do
|
208
|
+
@conn.exec( 'CREATE TABLE fmodtest ( foo varchar(33) )' )
|
209
|
+
res = @conn.exec( 'SELECT * FROM fmodtest' )
|
210
|
+
expect { res.fmod(-11) }.to raise_error( ArgumentError )
|
211
|
+
end
|
212
|
+
|
213
|
+
it "shouldn't raise an exception when a valid index is passed to PG::Result#fmod for a column with no typemod" do
|
214
|
+
@conn.exec( 'CREATE TABLE fmodtest ( foo text )' )
|
215
|
+
res = @conn.exec( 'SELECT * FROM fmodtest' )
|
216
|
+
res.fmod( 0 ).should == -1 # and it shouldn't raise an exception, either
|
217
|
+
end
|
218
|
+
|
219
|
+
# PQftable
|
220
|
+
it "can return the oid of the table from which a result column was fetched" do
|
221
|
+
@conn.exec( 'CREATE TABLE ftabletest ( foo text )' )
|
222
|
+
res = @conn.exec( 'SELECT * FROM ftabletest' )
|
223
|
+
|
224
|
+
res.ftable( 0 ).should == be_nonzero()
|
225
|
+
end
|
226
|
+
|
227
|
+
it "should raise an exception when an invalid index is passed to PG::Result#ftable" do
|
228
|
+
@conn.exec( 'CREATE TABLE ftabletest ( foo text )' )
|
229
|
+
res = @conn.exec( 'SELECT * FROM ftabletest' )
|
230
|
+
|
231
|
+
expect { res.ftable(18) }.to raise_error( ArgumentError )
|
232
|
+
end
|
233
|
+
|
234
|
+
it "should raise an exception when an invalid (negative) index is passed to PG::Result#ftable" do
|
235
|
+
@conn.exec( 'CREATE TABLE ftabletest ( foo text )' )
|
236
|
+
res = @conn.exec( 'SELECT * FROM ftabletest' )
|
237
|
+
|
238
|
+
expect { res.ftable(-2) }.to raise_error( ArgumentError )
|
239
|
+
end
|
240
|
+
|
241
|
+
it "shouldn't raise an exception when a valid index is passed to PG::Result#ftable for a " +
|
242
|
+
"column with no corresponding table" do
|
243
|
+
@conn.exec( 'CREATE TABLE ftabletest ( foo text )' )
|
244
|
+
res = @conn.exec( 'SELECT foo, LENGTH(foo) as length FROM ftabletest' )
|
245
|
+
res.ftable( 1 ).should == PG::INVALID_OID # and it shouldn't raise an exception, either
|
246
|
+
end
|
247
|
+
|
248
|
+
# PQftablecol
|
249
|
+
it "can return the column number (within its table) of a column in a result" do
|
250
|
+
@conn.exec( 'CREATE TABLE ftablecoltest ( foo text, bar numeric )' )
|
251
|
+
res = @conn.exec( 'SELECT * FROM ftablecoltest' )
|
252
|
+
|
253
|
+
res.ftablecol( 0 ).should == 1
|
254
|
+
res.ftablecol( 1 ).should == 2
|
255
|
+
end
|
256
|
+
|
257
|
+
it "should raise an exception when an invalid index is passed to PG::Result#ftablecol" do
|
258
|
+
@conn.exec( 'CREATE TABLE ftablecoltest ( foo text, bar numeric )' )
|
259
|
+
res = @conn.exec( 'SELECT * FROM ftablecoltest' )
|
260
|
+
|
261
|
+
expect { res.ftablecol(32) }.to raise_error( ArgumentError )
|
262
|
+
end
|
263
|
+
|
264
|
+
it "should raise an exception when an invalid (negative) index is passed to PG::Result#ftablecol" do
|
265
|
+
@conn.exec( 'CREATE TABLE ftablecoltest ( foo text, bar numeric )' )
|
266
|
+
res = @conn.exec( 'SELECT * FROM ftablecoltest' )
|
267
|
+
|
268
|
+
expect { res.ftablecol(-1) }.to raise_error( ArgumentError )
|
269
|
+
end
|
270
|
+
|
271
|
+
it "shouldn't raise an exception when a valid index is passed to PG::Result#ftablecol for a " +
|
272
|
+
"column with no corresponding table" do
|
273
|
+
@conn.exec( 'CREATE TABLE ftablecoltest ( foo text )' )
|
274
|
+
res = @conn.exec( 'SELECT foo, LENGTH(foo) as length FROM ftablecoltest' )
|
275
|
+
res.ftablecol(1).should == 0 # and it shouldn't raise an exception, either
|
276
|
+
end
|
277
|
+
|
278
|
+
it "can be manually checked for failed result status (async API)" do
|
279
|
+
@conn.send_query( "SELECT * FROM nonexistant_table" )
|
280
|
+
res = @conn.get_result
|
281
|
+
expect {
|
282
|
+
res.check
|
283
|
+
}.to raise_error( PG::Error, /relation "nonexistant_table" does not exist/ )
|
284
|
+
end
|
285
|
+
|
286
|
+
it "can return the values of a single field" do
|
287
|
+
res = @conn.exec( "SELECT 1 AS x, 'a' AS y UNION ALL SELECT 2, 'b'" )
|
288
|
+
res.field_values( 'x' ).should == ['1', '2']
|
289
|
+
res.field_values( 'y' ).should == ['a', 'b']
|
290
|
+
expect{ res.field_values( '' ) }.to raise_error(IndexError)
|
291
|
+
expect{ res.field_values( :x ) }.to raise_error(TypeError)
|
292
|
+
end
|
293
|
+
|
294
|
+
it "should raise a proper exception for a nonexistant table" do
|
295
|
+
expect {
|
296
|
+
@conn.exec( "SELECT * FROM nonexistant_table" )
|
297
|
+
}.to raise_error( PG::UndefinedTable, /relation "nonexistant_table" does not exist/ )
|
298
|
+
end
|
299
|
+
|
300
|
+
it "should raise a more generic exception for an unknown SQLSTATE" do
|
301
|
+
old_error = PG::ERROR_CLASSES.delete('42P01')
|
302
|
+
begin
|
303
|
+
expect {
|
304
|
+
@conn.exec( "SELECT * FROM nonexistant_table" )
|
305
|
+
}.to raise_error{|error|
|
306
|
+
error.should be_an_instance_of(PG::SyntaxErrorOrAccessRuleViolation)
|
307
|
+
error.to_s.should match(/relation "nonexistant_table" does not exist/)
|
308
|
+
}
|
309
|
+
ensure
|
310
|
+
PG::ERROR_CLASSES['42P01'] = old_error
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
it "should raise a ServerError for an unknown SQLSTATE class" do
|
315
|
+
old_error1 = PG::ERROR_CLASSES.delete('42P01')
|
316
|
+
old_error2 = PG::ERROR_CLASSES.delete('42')
|
317
|
+
begin
|
318
|
+
expect {
|
319
|
+
@conn.exec( "SELECT * FROM nonexistant_table" )
|
320
|
+
}.to raise_error{|error|
|
321
|
+
error.should be_an_instance_of(PG::ServerError)
|
322
|
+
error.to_s.should match(/relation "nonexistant_table" does not exist/)
|
323
|
+
}
|
324
|
+
ensure
|
325
|
+
PG::ERROR_CLASSES['42P01'] = old_error1
|
326
|
+
PG::ERROR_CLASSES['42'] = old_error2
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
it "should raise a proper exception for a nonexistant schema" do
|
331
|
+
expect {
|
332
|
+
@conn.exec( "DROP SCHEMA nonexistant_schema" )
|
333
|
+
}.to raise_error( PG::InvalidSchemaName, /schema "nonexistant_schema" does not exist/ )
|
334
|
+
end
|
335
|
+
|
336
|
+
it "the raised result should be nil in case of a connection error" do
|
337
|
+
c = PGconn.connect_start( '127.0.0.1', 54320, "", "", "me", "xxxx", "somedb" )
|
338
|
+
expect {
|
339
|
+
c.exec "select 1"
|
340
|
+
}.to raise_error{|error|
|
341
|
+
error.should be_an_instance_of(PG::UnableToSend)
|
342
|
+
error.result.should == nil
|
343
|
+
}
|
344
|
+
end
|
345
|
+
end
|
data/spec/pg_spec.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env rspec
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
BEGIN {
|
5
|
+
require 'pathname'
|
6
|
+
|
7
|
+
basedir = Pathname( __FILE__ ).dirname.parent
|
8
|
+
libdir = basedir + 'lib'
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
|
11
|
+
$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
|
12
|
+
}
|
13
|
+
|
14
|
+
require 'rspec'
|
15
|
+
require 'spec/lib/helpers'
|
16
|
+
require 'pg'
|
17
|
+
|
18
|
+
describe PG do
|
19
|
+
|
20
|
+
it "knows what version of the libpq library is loaded", :postgresql_91 do
|
21
|
+
PG.library_version.should be_an( Integer )
|
22
|
+
PG.library_version.should >= 90100
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
it "knows whether or not the library is threadsafe" do
|
27
|
+
PG.should be_threadsafe()
|
28
|
+
end
|
29
|
+
|
30
|
+
it "does have hierarchical error classes" do
|
31
|
+
PG::UndefinedTable.ancestors[0,4].should == [
|
32
|
+
PG::UndefinedTable,
|
33
|
+
PG::SyntaxErrorOrAccessRuleViolation,
|
34
|
+
PG::ServerError,
|
35
|
+
PG::Error]
|
36
|
+
|
37
|
+
PG::InvalidSchemaName.ancestors[0,3].should == [
|
38
|
+
PG::InvalidSchemaName,
|
39
|
+
PG::ServerError,
|
40
|
+
PG::Error]
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
metadata
CHANGED
@@ -1,186 +1,232 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
|
-
- Charles Nutter
|
8
7
|
- John Shahid
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhqdnNo
|
14
|
+
YWhpZDEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
15
|
+
MB4XDTE1MDIxODA0MzE1N1oXDTE2MDIxODA0MzE1N1owPzERMA8GA1UEAwwIanZz
|
16
|
+
aGFoaWQxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
|
17
|
+
bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKp9U3NeEqkS9JKCqnd3
|
18
|
+
djg+qRTG+HRjN413rLUiGBleBysdimaOmabD8onDQmIDgIw3ufYQk9m4XulA/N5y
|
19
|
+
4LlC7aNMsI04vGWkPQGO+KnWTZl+YkeTYxYgC72/gI8LsTcIEy/vd+VV65f2jEgC
|
20
|
+
9jFvcLWykm6TtJBxW+SZc862ZMCwYiZWVVE78EENsasXJUdleyK3hyMFIftE3IId
|
21
|
+
ves3MD/X6ApyRNKZyNRHdjaQE2hg3vtpqrN1WSuNfgxzIQz2cSfNNmzCA12gOQp1
|
22
|
+
emDLxK/2fPJIfS55coC/ogLfmdEwVtBbgs9C5/ZagjgkOjthTOz3DoiWI6aVDhqf
|
23
|
+
YdsCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFFO8
|
24
|
+
oTWH/XLOGzTn+X/ADdNr0kLhMB0GA1UdEQQWMBSBEmp2c2hhaGlkQGdtYWlsLmNv
|
25
|
+
bTAdBgNVHRIEFjAUgRJqdnNoYWhpZEBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
|
26
|
+
ggEBAGHsstPfe5yMSpYtPQRoQ/i30d59cH8tNFkLjMxiZrpSro4OslO9q8ZC63L9
|
27
|
+
7wpZDHYvrSCTjYBwo2kKgbHOEP0+jkz69X9WxEfLeUqdiFbgRv7WptzMRf7GizpV
|
28
|
+
2z0qxtY4YlpNrSm4V4v6GaE5NQ8DuBP6Hg3yFJl2dKnzEZHZG9B4gQCntiNAlieY
|
29
|
+
5OYqqXi6D6L46GGcTmieG0xln0ApG6UewJ7VWub+1dvuyoNAS2sdFinGvekivSXe
|
30
|
+
BtwvpQUP6ZxizBsRRliNP4kzx6Oz7mJFcrZoBdZpRUx+lld6H4Yzp1n0OWQHN4z/
|
31
|
+
ylD2EYTVPFxjZ3GYthhV27zUL2w=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
13
34
|
dependencies:
|
14
35
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
36
|
+
name: hoe-mercurial
|
16
37
|
version_requirements: !ruby/object:Gem::Requirement
|
17
38
|
requirements:
|
18
39
|
- - ~>
|
19
40
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
41
|
+
version: 1.4.0
|
21
42
|
requirement: !ruby/object:Gem::Requirement
|
22
43
|
requirements:
|
23
44
|
- - ~>
|
24
45
|
- !ruby/object:Gem::Version
|
25
|
-
version:
|
46
|
+
version: 1.4.0
|
26
47
|
prerelease: false
|
27
48
|
type: :development
|
28
49
|
- !ruby/object:Gem::Dependency
|
29
|
-
name: hoe-
|
50
|
+
name: hoe-highline
|
30
51
|
version_requirements: !ruby/object:Gem::Requirement
|
31
52
|
requirements:
|
32
|
-
- -
|
53
|
+
- - ~>
|
33
54
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
55
|
+
version: 0.1.0
|
35
56
|
requirement: !ruby/object:Gem::Requirement
|
36
57
|
requirements:
|
37
|
-
- -
|
58
|
+
- - ~>
|
38
59
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
60
|
+
version: 0.1.0
|
40
61
|
prerelease: false
|
41
62
|
type: :development
|
42
63
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
64
|
+
name: rdoc
|
44
65
|
version_requirements: !ruby/object:Gem::Requirement
|
45
66
|
requirements:
|
46
|
-
- -
|
67
|
+
- - ~>
|
47
68
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
69
|
+
version: '4.0'
|
49
70
|
requirement: !ruby/object:Gem::Requirement
|
50
71
|
requirements:
|
51
|
-
- -
|
72
|
+
- - ~>
|
52
73
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
74
|
+
version: '4.0'
|
54
75
|
prerelease: false
|
55
76
|
type: :development
|
56
77
|
- !ruby/object:Gem::Dependency
|
57
|
-
name: rake
|
78
|
+
name: rake-compiler
|
58
79
|
version_requirements: !ruby/object:Gem::Requirement
|
59
80
|
requirements:
|
60
|
-
- -
|
81
|
+
- - ~>
|
61
82
|
- !ruby/object:Gem::Version
|
62
83
|
version: '0.9'
|
63
84
|
requirement: !ruby/object:Gem::Requirement
|
64
85
|
requirements:
|
65
|
-
- -
|
86
|
+
- - ~>
|
66
87
|
- !ruby/object:Gem::Version
|
67
88
|
version: '0.9'
|
68
89
|
prerelease: false
|
69
90
|
type: :development
|
70
91
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - '='
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 0.8.0
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - '='
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 0.8.0
|
82
|
-
prerelease: false
|
83
|
-
type: :development
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: git
|
86
|
-
version_requirements: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - '>='
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '0'
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - '>='
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '0'
|
96
|
-
prerelease: false
|
97
|
-
type: :development
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: logger
|
92
|
+
name: hoe
|
100
93
|
version_requirements: !ruby/object:Gem::Requirement
|
101
94
|
requirements:
|
102
|
-
- -
|
95
|
+
- - ~>
|
103
96
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
97
|
+
version: 3.5.1
|
105
98
|
requirement: !ruby/object:Gem::Requirement
|
106
99
|
requirements:
|
107
|
-
- -
|
100
|
+
- - ~>
|
108
101
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
102
|
+
version: 3.5.1
|
110
103
|
prerelease: false
|
111
104
|
type: :development
|
112
105
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
106
|
+
name: hoe-deveiate
|
114
107
|
version_requirements: !ruby/object:Gem::Requirement
|
115
108
|
requirements:
|
116
|
-
- -
|
109
|
+
- - ~>
|
117
110
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
111
|
+
version: '0.2'
|
119
112
|
requirement: !ruby/object:Gem::Requirement
|
120
113
|
requirements:
|
121
|
-
- -
|
114
|
+
- - ~>
|
122
115
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
116
|
+
version: '0.2'
|
124
117
|
prerelease: false
|
125
118
|
type: :development
|
126
119
|
- !ruby/object:Gem::Dependency
|
127
|
-
name: hoe
|
120
|
+
name: hoe-bundler
|
128
121
|
version_requirements: !ruby/object:Gem::Requirement
|
129
122
|
requirements:
|
130
123
|
- - ~>
|
131
124
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
125
|
+
version: '1.0'
|
133
126
|
requirement: !ruby/object:Gem::Requirement
|
134
127
|
requirements:
|
135
128
|
- - ~>
|
136
129
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
130
|
+
version: '1.0'
|
138
131
|
prerelease: false
|
139
132
|
type: :development
|
140
133
|
description: |-
|
141
|
-
This
|
142
|
-
|
143
|
-
replacement for JRuby that uses the JDBC driver and private API of
|
144
|
-
Postgres. Unfortunately ruby-pg (which uses libpq under the hood)
|
145
|
-
exposed a lot of features of Postgres that were impossible to
|
146
|
-
implement or were complicated given the nature of the JDBC and the
|
147
|
-
encapsulation of many features that are exposed in ruby-pg.
|
134
|
+
This file needs a translation of the English README. Pull requests, patches, or
|
135
|
+
volunteers gladly accepted.
|
148
136
|
|
149
|
-
|
150
|
-
bugs that needs to be fixed and more testing. So please checkout
|
151
|
-
the code and submit pull requests with some fixes. If your Java-Fu
|
152
|
-
isn't that great you can still contribute by submitting test cases
|
153
|
-
and We'll be happy to fix them.
|
137
|
+
Until such time, please accept my sincere apologies for not knowing Japanese.
|
154
138
|
email:
|
155
|
-
- headius@headius.com
|
156
139
|
- jvshahid@gmail.com
|
157
|
-
executables:
|
158
|
-
- pg
|
140
|
+
executables: []
|
159
141
|
extensions: []
|
160
142
|
extra_rdoc_files:
|
161
|
-
-
|
143
|
+
- Contributors.rdoc
|
144
|
+
- History.rdoc
|
162
145
|
- Manifest.txt
|
146
|
+
- README-OS_X.rdoc
|
147
|
+
- README-Windows.rdoc
|
148
|
+
- README.ja.rdoc
|
163
149
|
- README.rdoc
|
150
|
+
- ext/errorcodes.txt
|
151
|
+
- POSTGRES
|
152
|
+
- LICENSE
|
153
|
+
- ext/gvl_wrappers.c
|
154
|
+
- ext/pg.c
|
155
|
+
- ext/pg_connection.c
|
156
|
+
- ext/pg_errors.c
|
157
|
+
- ext/pg_result.c
|
164
158
|
files:
|
165
|
-
-
|
159
|
+
- .gemtest
|
160
|
+
- BSDL
|
161
|
+
- ChangeLog
|
162
|
+
- Contributors.rdoc
|
163
|
+
- History.rdoc
|
164
|
+
- LICENSE
|
166
165
|
- Manifest.txt
|
166
|
+
- POSTGRES
|
167
|
+
- README-OS_X.rdoc
|
168
|
+
- README-Windows.rdoc
|
169
|
+
- README.ja.rdoc
|
167
170
|
- README.rdoc
|
168
171
|
- Rakefile
|
169
|
-
-
|
172
|
+
- Rakefile.cross
|
173
|
+
- ext/errorcodes.def
|
174
|
+
- ext/errorcodes.rb
|
175
|
+
- ext/errorcodes.txt
|
176
|
+
- ext/extconf.rb
|
177
|
+
- ext/gvl_wrappers.c
|
178
|
+
- ext/gvl_wrappers.h
|
179
|
+
- ext/pg.c
|
180
|
+
- ext/pg.h
|
181
|
+
- ext/pg_connection.c
|
182
|
+
- ext/pg_errors.c
|
183
|
+
- ext/pg_result.c
|
184
|
+
- ext/vc/pg.sln
|
185
|
+
- ext/vc/pg_18/pg.vcproj
|
186
|
+
- ext/vc/pg_19/pg_19.vcproj
|
170
187
|
- lib/pg.rb
|
171
|
-
- lib/pg/result.rb
|
172
|
-
- lib/pg/constants.rb
|
173
188
|
- lib/pg/connection.rb
|
189
|
+
- lib/pg/constants.rb
|
174
190
|
- lib/pg/exceptions.rb
|
191
|
+
- lib/pg/result.rb
|
175
192
|
- lib/pg_ext.jar
|
176
|
-
- .
|
177
|
-
|
193
|
+
- sample/array_insert.rb
|
194
|
+
- sample/async_api.rb
|
195
|
+
- sample/async_copyto.rb
|
196
|
+
- sample/async_mixed.rb
|
197
|
+
- sample/check_conn.rb
|
198
|
+
- sample/copyfrom.rb
|
199
|
+
- sample/copyto.rb
|
200
|
+
- sample/cursor.rb
|
201
|
+
- sample/disk_usage_report.rb
|
202
|
+
- sample/issue-119.rb
|
203
|
+
- sample/losample.rb
|
204
|
+
- sample/minimal-testcase.rb
|
205
|
+
- sample/notify_wait.rb
|
206
|
+
- sample/pg_statistics.rb
|
207
|
+
- sample/replication_monitor.rb
|
208
|
+
- sample/test_binary_values.rb
|
209
|
+
- sample/wal_shipper.rb
|
210
|
+
- sample/warehouse_partitions.rb
|
211
|
+
- spec/data/expected_trace.out
|
212
|
+
- spec/data/random_binary_data
|
213
|
+
- spec/lib/helpers.rb
|
214
|
+
- spec/pg/connection_spec.rb
|
215
|
+
- spec/pg/result_spec.rb
|
216
|
+
- spec/pg_spec.rb
|
217
|
+
homepage: https://bitbucket.org/ged/ruby-pg
|
178
218
|
licenses:
|
179
|
-
-
|
219
|
+
- BSD
|
220
|
+
- Ruby
|
221
|
+
- GPL
|
180
222
|
metadata: {}
|
181
223
|
post_install_message:
|
182
224
|
rdoc_options:
|
183
|
-
-
|
225
|
+
- -f
|
226
|
+
- fivefish
|
227
|
+
- -t
|
228
|
+
- 'pg: The Ruby Interface to PostgreSQL'
|
229
|
+
- -m
|
184
230
|
- README.rdoc
|
185
231
|
require_paths:
|
186
232
|
- lib
|
@@ -188,16 +234,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
234
|
requirements:
|
189
235
|
- - '>='
|
190
236
|
- !ruby/object:Gem::Version
|
191
|
-
version:
|
237
|
+
version: 1.8.7
|
192
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
239
|
requirements:
|
194
|
-
- - '
|
240
|
+
- - '>='
|
195
241
|
- !ruby/object:Gem::Version
|
196
|
-
version:
|
242
|
+
version: '0'
|
197
243
|
requirements: []
|
198
244
|
rubyforge_project: pg_jruby
|
199
|
-
rubygems_version: 2.
|
245
|
+
rubygems_version: 2.4.5
|
200
246
|
signing_key:
|
201
247
|
specification_version: 4
|
202
|
-
summary: This
|
248
|
+
summary: This file needs a translation of the English README
|
203
249
|
test_files: []
|