pg 0.12.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +2 -0
  3. data/BSDL +22 -0
  4. data/ChangeLog +1504 -11
  5. data/Contributors.rdoc +7 -0
  6. data/History.rdoc +181 -3
  7. data/LICENSE +12 -14
  8. data/Manifest.txt +29 -15
  9. data/{BSD → POSTGRES} +0 -0
  10. data/{README.OS_X.rdoc → README-OS_X.rdoc} +0 -0
  11. data/{README.windows.rdoc → README-Windows.rdoc} +0 -0
  12. data/README.ja.rdoc +10 -3
  13. data/README.rdoc +54 -28
  14. data/Rakefile +53 -26
  15. data/Rakefile.cross +235 -196
  16. data/ext/errorcodes.def +931 -0
  17. data/ext/errorcodes.rb +45 -0
  18. data/ext/errorcodes.txt +463 -0
  19. data/ext/extconf.rb +37 -7
  20. data/ext/gvl_wrappers.c +19 -0
  21. data/ext/gvl_wrappers.h +211 -0
  22. data/ext/pg.c +317 -4277
  23. data/ext/pg.h +124 -21
  24. data/ext/pg_connection.c +3642 -0
  25. data/ext/pg_errors.c +89 -0
  26. data/ext/pg_result.c +920 -0
  27. data/lib/pg/connection.rb +86 -0
  28. data/lib/pg/constants.rb +11 -0
  29. data/lib/pg/exceptions.rb +11 -0
  30. data/lib/pg/result.rb +16 -0
  31. data/lib/pg.rb +26 -43
  32. data/sample/array_insert.rb +20 -0
  33. data/sample/async_api.rb +21 -24
  34. data/sample/async_copyto.rb +2 -2
  35. data/sample/async_mixed.rb +56 -0
  36. data/sample/check_conn.rb +21 -0
  37. data/sample/copyfrom.rb +1 -1
  38. data/sample/copyto.rb +1 -1
  39. data/sample/cursor.rb +2 -2
  40. data/sample/disk_usage_report.rb +186 -0
  41. data/sample/issue-119.rb +94 -0
  42. data/sample/losample.rb +6 -6
  43. data/sample/minimal-testcase.rb +17 -0
  44. data/sample/notify_wait.rb +51 -22
  45. data/sample/pg_statistics.rb +294 -0
  46. data/sample/replication_monitor.rb +231 -0
  47. data/sample/test_binary_values.rb +4 -6
  48. data/sample/wal_shipper.rb +434 -0
  49. data/sample/warehouse_partitions.rb +320 -0
  50. data/spec/lib/helpers.rb +70 -23
  51. data/spec/pg/connection_spec.rb +1128 -0
  52. data/spec/{pgresult_spec.rb → pg/result_spec.rb} +142 -47
  53. data/spec/pg_spec.rb +44 -0
  54. data.tar.gz.sig +0 -0
  55. metadata +145 -100
  56. metadata.gz.sig +0 -0
  57. data/GPL +0 -340
  58. data/ext/compat.c +0 -541
  59. data/ext/compat.h +0 -184
  60. data/misc/openssl-pg-segfault.rb +0 -31
  61. data/sample/psql.rb +0 -1181
  62. data/sample/psqlHelp.rb +0 -158
  63. data/sample/test1.rb +0 -60
  64. data/sample/test2.rb +0 -44
  65. data/sample/test4.rb +0 -71
  66. data/spec/m17n_spec.rb +0 -151
  67. data/spec/pgconn_spec.rb +0 -643
metadata CHANGED
@@ -1,205 +1,250 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
5
- prerelease:
4
+ version: 0.16.0
6
5
  platform: ruby
7
6
  authors:
8
- - Jeff Davis
9
7
  - Michael Granger
10
8
  autorequire:
11
9
  bindir: bin
12
10
  cert_chain:
13
- - ! '-----BEGIN CERTIFICATE-----
14
-
15
- MIIDLDCCAhSgAwIBAgIBADANBgkqhkiG9w0BAQUFADA8MQwwCgYDVQQDDANnZWQx
16
-
17
- FzAVBgoJkiaJk/IsZAEZFgdfYWVyaWVfMRMwEQYKCZImiZPyLGQBGRYDb3JnMB4X
18
-
19
- DTEwMDkxNjE0NDg1MVoXDTExMDkxNjE0NDg1MVowPDEMMAoGA1UEAwwDZ2VkMRcw
20
-
21
- FQYKCZImiZPyLGQBGRYHX2FlcmllXzETMBEGCgmSJomT8ixkARkWA29yZzCCASIw
22
-
23
- DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALy//BFxC1f/cPSnwtJBWoFiFrir
24
-
25
- h7RicI+joq/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3Akc3htA==
49
32
  -----END CERTIFICATE-----
50
-
51
- '
52
- date: 2011-12-07 00:00:00.000000000 Z
33
+ date: 2013-07-23 00:00:00.000000000 Z
53
34
  dependencies:
54
35
  - !ruby/object:Gem::Dependency
55
- name: rake-compiler
56
- requirement: &70276294379100 !ruby/object:Gem::Requirement
57
- none: false
36
+ name: hoe-mercurial
37
+ requirement: !ruby/object:Gem::Requirement
58
38
  requirements:
59
39
  - - ~>
60
40
  - !ruby/object:Gem::Version
61
- version: '0.7'
62
- type: :runtime
41
+ version: 1.4.0
42
+ type: :development
63
43
  prerelease: false
64
- version_requirements: *70276294379100
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: 1.4.0
65
49
  - !ruby/object:Gem::Dependency
66
- name: hoe-mercurial
67
- requirement: &70276294378680 !ruby/object:Gem::Requirement
68
- none: false
50
+ name: hoe-highline
51
+ requirement: !ruby/object:Gem::Requirement
69
52
  requirements:
70
53
  - - ~>
71
54
  - !ruby/object:Gem::Version
72
- version: 1.3.1
55
+ version: 0.1.0
73
56
  type: :development
74
57
  prerelease: false
75
- version_requirements: *70276294378680
58
+ version_requirements: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ~>
61
+ - !ruby/object:Gem::Version
62
+ version: 0.1.0
76
63
  - !ruby/object:Gem::Dependency
77
- name: hoe-highline
78
- requirement: &70276294378220 !ruby/object:Gem::Requirement
79
- none: false
64
+ name: rdoc
65
+ requirement: !ruby/object:Gem::Requirement
80
66
  requirements:
81
67
  - - ~>
82
68
  - !ruby/object:Gem::Version
83
- version: 0.0.1
69
+ version: '4.0'
84
70
  type: :development
85
71
  prerelease: false
86
- version_requirements: *70276294378220
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: '4.0'
87
77
  - !ruby/object:Gem::Dependency
88
- name: rspec
89
- requirement: &70276294377740 !ruby/object:Gem::Requirement
90
- none: false
78
+ name: rake-compiler
79
+ requirement: !ruby/object:Gem::Requirement
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
94
- version: '2.6'
83
+ version: '0.8'
95
84
  type: :development
96
85
  prerelease: false
97
- version_requirements: *70276294377740
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: '0.8'
91
+ - !ruby/object:Gem::Dependency
92
+ name: hoe-deveiate
93
+ requirement: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ~>
96
+ - !ruby/object:Gem::Version
97
+ version: '0.2'
98
+ type: :development
99
+ prerelease: false
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ~>
103
+ - !ruby/object:Gem::Version
104
+ version: '0.2'
98
105
  - !ruby/object:Gem::Dependency
99
106
  name: hoe
100
- requirement: &70276294377300 !ruby/object:Gem::Requirement
101
- none: false
107
+ requirement: !ruby/object:Gem::Requirement
102
108
  requirements:
103
109
  - - ~>
104
110
  - !ruby/object:Gem::Version
105
- version: '2.12'
111
+ version: '3.5'
106
112
  type: :development
107
113
  prerelease: false
108
- version_requirements: *70276294377300
109
- description: ! "Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].\n\nIt
110
- works with PostgreSQL 8.2 and later.\n\nThis will be the last minor version to support
111
- 8.2 -- 0.13 will support 8.3 \nand later, following the \n{PostgreSQL Release Support
112
- Policy}[http://bit.ly/6AfPhm]."
114
+ version_requirements: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ~>
117
+ - !ruby/object:Gem::Version
118
+ version: '3.5'
119
+ description: |-
120
+ Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].
121
+
122
+ It works with {PostgreSQL 8.4 and later}[http://www.postgresql.org/support/versioning/].
123
+
124
+ A small example usage:
125
+
126
+ #!/usr/bin/env ruby
127
+
128
+ require 'pg'
129
+
130
+ # Output a table of current connections to the DB
131
+ conn = PG.connect( dbname: 'sales' )
132
+ conn.exec( "SELECT * FROM pg_stat_activity" ) do |result|
133
+ puts " PID | User | Query"
134
+ result.each do |row|
135
+ puts " %7d | %-16s | %s " %
136
+ row.values_at('procpid', 'usename', 'current_query')
137
+ end
138
+ end
113
139
  email:
114
- - ruby-pg@j-davis.com
115
140
  - ged@FaerieMUD.org
116
141
  executables: []
117
142
  extensions:
118
143
  - ext/extconf.rb
119
144
  extra_rdoc_files:
120
- - Manifest.txt
121
145
  - Contributors.rdoc
122
146
  - History.rdoc
147
+ - Manifest.txt
148
+ - README-OS_X.rdoc
149
+ - README-Windows.rdoc
123
150
  - README.ja.rdoc
124
- - README.OS_X.rdoc
125
151
  - README.rdoc
126
- - README.windows.rdoc
127
- - BSD
128
- - GPL
152
+ - ext/errorcodes.txt
153
+ - POSTGRES
129
154
  - LICENSE
130
- - ext/compat.c
155
+ - ext/gvl_wrappers.c
131
156
  - ext/pg.c
157
+ - ext/pg_connection.c
158
+ - ext/pg_errors.c
159
+ - ext/pg_result.c
132
160
  files:
133
161
  - .gemtest
134
- - BSD
162
+ - BSDL
135
163
  - ChangeLog
136
164
  - Contributors.rdoc
137
- - GPL
138
165
  - History.rdoc
139
166
  - LICENSE
140
167
  - Manifest.txt
141
- - README.OS_X.rdoc
168
+ - POSTGRES
169
+ - README-OS_X.rdoc
170
+ - README-Windows.rdoc
142
171
  - README.ja.rdoc
143
172
  - README.rdoc
144
- - README.windows.rdoc
145
173
  - Rakefile
146
174
  - Rakefile.cross
147
- - ext/compat.c
148
- - ext/compat.h
175
+ - ext/errorcodes.def
176
+ - ext/errorcodes.rb
177
+ - ext/errorcodes.txt
149
178
  - ext/extconf.rb
179
+ - ext/gvl_wrappers.c
180
+ - ext/gvl_wrappers.h
150
181
  - ext/pg.c
151
182
  - ext/pg.h
183
+ - ext/pg_connection.c
184
+ - ext/pg_errors.c
185
+ - ext/pg_result.c
152
186
  - ext/vc/pg.sln
153
187
  - ext/vc/pg_18/pg.vcproj
154
188
  - ext/vc/pg_19/pg_19.vcproj
155
189
  - lib/pg.rb
156
- - misc/openssl-pg-segfault.rb
190
+ - lib/pg/connection.rb
191
+ - lib/pg/constants.rb
192
+ - lib/pg/exceptions.rb
193
+ - lib/pg/result.rb
194
+ - sample/array_insert.rb
157
195
  - sample/async_api.rb
158
196
  - sample/async_copyto.rb
197
+ - sample/async_mixed.rb
198
+ - sample/check_conn.rb
159
199
  - sample/copyfrom.rb
160
200
  - sample/copyto.rb
161
201
  - sample/cursor.rb
202
+ - sample/disk_usage_report.rb
203
+ - sample/issue-119.rb
162
204
  - sample/losample.rb
205
+ - sample/minimal-testcase.rb
163
206
  - sample/notify_wait.rb
164
- - sample/psql.rb
165
- - sample/psqlHelp.rb
166
- - sample/test1.rb
167
- - sample/test2.rb
168
- - sample/test4.rb
207
+ - sample/pg_statistics.rb
208
+ - sample/replication_monitor.rb
169
209
  - sample/test_binary_values.rb
210
+ - sample/wal_shipper.rb
211
+ - sample/warehouse_partitions.rb
170
212
  - spec/data/expected_trace.out
171
213
  - spec/data/random_binary_data
172
214
  - spec/lib/helpers.rb
173
- - spec/m17n_spec.rb
174
- - spec/pgconn_spec.rb
175
- - spec/pgresult_spec.rb
215
+ - spec/pg/connection_spec.rb
216
+ - spec/pg/result_spec.rb
217
+ - spec/pg_spec.rb
176
218
  homepage: https://bitbucket.org/ged/ruby-pg
177
219
  licenses:
178
220
  - BSD
179
221
  - Ruby
180
222
  - GPL
223
+ metadata: {}
181
224
  post_install_message:
182
225
  rdoc_options:
183
- - --main
226
+ - -f
227
+ - fivefish
228
+ - -t
229
+ - 'pg: The Ruby Interface to PostgreSQL'
230
+ - -m
184
231
  - README.rdoc
185
232
  require_paths:
186
233
  - lib
187
234
  required_ruby_version: !ruby/object:Gem::Requirement
188
- none: false
189
235
  requirements:
190
- - - ! '>='
236
+ - - '>='
191
237
  - !ruby/object:Gem::Version
192
238
  version: 1.8.7
193
239
  required_rubygems_version: !ruby/object:Gem::Requirement
194
- none: false
195
240
  requirements:
196
- - - ! '>='
241
+ - - '>='
197
242
  - !ruby/object:Gem::Version
198
243
  version: '0'
199
244
  requirements: []
200
245
  rubyforge_project: pg
201
- rubygems_version: 1.8.11
246
+ rubygems_version: 2.0.5
202
247
  signing_key:
203
- specification_version: 3
248
+ specification_version: 4
204
249
  summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
205
250
  test_files: []
metadata.gz.sig CHANGED
Binary file