pg 0.12.0 → 0.16.0
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 +7 -0
- checksums.yaml.gz.sig +2 -0
- data/BSDL +22 -0
- data/ChangeLog +1504 -11
- data/Contributors.rdoc +7 -0
- data/History.rdoc +181 -3
- data/LICENSE +12 -14
- data/Manifest.txt +29 -15
- data/{BSD → POSTGRES} +0 -0
- data/{README.OS_X.rdoc → README-OS_X.rdoc} +0 -0
- data/{README.windows.rdoc → README-Windows.rdoc} +0 -0
- data/README.ja.rdoc +10 -3
- data/README.rdoc +54 -28
- data/Rakefile +53 -26
- data/Rakefile.cross +235 -196
- data/ext/errorcodes.def +931 -0
- data/ext/errorcodes.rb +45 -0
- data/ext/errorcodes.txt +463 -0
- data/ext/extconf.rb +37 -7
- data/ext/gvl_wrappers.c +19 -0
- data/ext/gvl_wrappers.h +211 -0
- data/ext/pg.c +317 -4277
- data/ext/pg.h +124 -21
- data/ext/pg_connection.c +3642 -0
- data/ext/pg_errors.c +89 -0
- data/ext/pg_result.c +920 -0
- data/lib/pg/connection.rb +86 -0
- data/lib/pg/constants.rb +11 -0
- data/lib/pg/exceptions.rb +11 -0
- data/lib/pg/result.rb +16 -0
- data/lib/pg.rb +26 -43
- data/sample/array_insert.rb +20 -0
- data/sample/async_api.rb +21 -24
- data/sample/async_copyto.rb +2 -2
- data/sample/async_mixed.rb +56 -0
- data/sample/check_conn.rb +21 -0
- data/sample/copyfrom.rb +1 -1
- data/sample/copyto.rb +1 -1
- data/sample/cursor.rb +2 -2
- data/sample/disk_usage_report.rb +186 -0
- data/sample/issue-119.rb +94 -0
- data/sample/losample.rb +6 -6
- data/sample/minimal-testcase.rb +17 -0
- data/sample/notify_wait.rb +51 -22
- data/sample/pg_statistics.rb +294 -0
- data/sample/replication_monitor.rb +231 -0
- data/sample/test_binary_values.rb +4 -6
- data/sample/wal_shipper.rb +434 -0
- data/sample/warehouse_partitions.rb +320 -0
- data/spec/lib/helpers.rb +70 -23
- data/spec/pg/connection_spec.rb +1128 -0
- data/spec/{pgresult_spec.rb → pg/result_spec.rb} +142 -47
- data/spec/pg_spec.rb +44 -0
- data.tar.gz.sig +0 -0
- metadata +145 -100
- metadata.gz.sig +0 -0
- data/GPL +0 -340
- data/ext/compat.c +0 -541
- data/ext/compat.h +0 -184
- data/misc/openssl-pg-segfault.rb +0 -31
- data/sample/psql.rb +0 -1181
- data/sample/psqlHelp.rb +0 -158
- data/sample/test1.rb +0 -60
- data/sample/test2.rb +0 -44
- data/sample/test4.rb +0 -71
- data/spec/m17n_spec.rb +0 -151
- data/spec/pgconn_spec.rb +0 -643
data/misc/openssl-pg-segfault.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
PGHOST = 'localhost'
|
4
|
-
PGDB = 'test'
|
5
|
-
#SOCKHOST = 'github.com'
|
6
|
-
SOCKHOST = 'it-trac.laika.com'
|
7
|
-
|
8
|
-
# Load pg first, so the libssl.so that libpq is linked against is loaded.
|
9
|
-
require 'pg'
|
10
|
-
$stderr.puts "connecting to postgres://#{PGHOST}/#{PGDB}"
|
11
|
-
conn = PGconn.connect( PGHOST, :dbname => PGDB )
|
12
|
-
|
13
|
-
# Now load OpenSSL, which might be linked against a different libssl.
|
14
|
-
require 'socket'
|
15
|
-
require 'openssl'
|
16
|
-
$stderr.puts "Connecting to #{SOCKHOST}"
|
17
|
-
sock = TCPSocket.open( SOCKHOST, 443 )
|
18
|
-
ctx = OpenSSL::SSL::SSLContext.new
|
19
|
-
sock = OpenSSL::SSL::SSLSocket.new( sock, ctx )
|
20
|
-
sock.sync_close = true
|
21
|
-
|
22
|
-
# The moment of truth...
|
23
|
-
$stderr.puts "Attempting to connect..."
|
24
|
-
begin
|
25
|
-
sock.connect
|
26
|
-
rescue Errno
|
27
|
-
$stderr.puts "Got an error connecting, but no segfault."
|
28
|
-
else
|
29
|
-
$stderr.puts "Nope, no segfault!"
|
30
|
-
end
|
31
|
-
|