pg 0.10.1 → 0.11.0pre220

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data.tar.gz.sig +0 -0
  2. data/ChangeLog +253 -235
  3. data/Contributors +2 -0
  4. data/ext/pg.c +129 -20
  5. data/spec/pgresult_spec.rb +9 -0
  6. metadata +11 -6
  7. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,10 +1,28 @@
1
- 214[master,tip] 8ab3dd3c757b 2011-01-19 08:00 -0800 ged
1
+ 220[github/master,master,tip]:217,219 fb7d22101adf 2011-02-23 11:40 -0800 ged
2
+ Merged with 1c3a1ca9f0cd
3
+
4
+ 219 1c3a1ca9f0cd 2011-01-22 04:41 +0800 ghazel
5
+ for windows support, duplicate the sockets from libpq and create temporary CRT fds
6
+
7
+ 218:214 c3f163bf1ecd 2011-01-22 22:11 -0800 ged
8
+ Pulling fixes for Windows from ghazel on Github
9
+
10
+ 217 18f413081e0c 2011-02-10 16:19 -0800 ged
11
+ Bump minor version.
12
+
13
+ 216 739692aa8dd1 2011-01-31 17:10 -0800 ged
14
+ Reformatting fixes for PGresult#[] and PGresult#values
15
+
16
+ 215 59679aee98ee 2011-01-31 11:30 -0600 me-bitbucket
17
+ added PGresult#values to get an array of arrays
18
+
19
+ 214 8ab3dd3c757b 2011-01-19 08:00 -0800 ged
2
20
  Added tag v0.10.1 for changeset de10b5d8e442
3
21
 
4
22
  213[v0.10.1] de10b5d8e442 2011-01-19 08:00 -0800 ged
5
23
  Added signature for changeset 230ea3e68db2
6
24
 
7
- 212[github/master] 230ea3e68db2 2011-01-19 07:54 -0800 ged
25
+ 212 230ea3e68db2 2011-01-19 07:54 -0800 ged
8
26
  Add an include guard for pg.h
9
27
 
10
28
  211 f877d2d399cc 2011-01-19 07:53 -0800 ged
@@ -46,7 +64,7 @@
46
64
  199 de86dca00ad2 2010-12-01 18:24 -0800 ged
47
65
  Finished the merge of default; fixed specs under 1.9.2.
48
66
 
49
- 198:197,190 60664b2495cf 2010-12-01 16:39 -0800 ged
67
+ 198:197,188 60664b2495cf 2010-12-01 16:39 -0800 ged
50
68
  merge of default
51
69
 
52
70
  197 148d0cc3db4a 2010-12-01 14:19 -0800 ged
@@ -67,579 +85,579 @@
67
85
  192 413f9e81e3ea 2010-11-01 09:01 -0700 ged
68
86
  More work trying to get the Windows-native gem to compile. No luck, but it's closer.
69
87
 
70
- 191:171 3402babf2cdf 2010-10-31 16:29 -0700 ged
88
+ 191 3402babf2cdf 2010-10-31 16:29 -0700 ged
71
89
  Fixed issue with PGconn#wait_for_notify that caused it to miss notifications that happened after the LISTEN but before the wait_for_notify.
72
90
 
73
- 190 193043bf2244 2010-10-08 09:40 -0700 ged
74
- Added support for the payload of NOTIFY events (w/Mahlon E. Smith)
75
-
76
- 189:169 ce9b893ff824 2010-10-08 07:25 -0700 ged
77
- start new patch on default
78
-
79
- 188:120 d5fa3e079a55 2009-12-31 09:58 -0800 ged
80
- Closing branch
81
-
82
- 187 4c2ea65f2eb9 2008-10-14 05:27 +0000 davis
83
- Merged revisions 175 via svnmerge from
84
-
85
- 186 7e7c22be0302 2008-10-05 19:43 +0000 davis
86
- Merged revisions 169-173 via svnmerge from
87
-
88
- 185 3e9dda291ef3 2008-08-17 20:42 +0000 davis
89
- Merged revisions 166 via svnmerge from
90
-
91
- 184 3686c9944fe1 2008-08-17 20:27 +0000 davis
92
- Add ext_helper.rb
93
-
94
- 183 ed3294b76bf7 2008-08-17 20:23 +0000 davis
95
- Merged revisions 149-160 via svnmerge from
96
-
97
- 182 ff6af5fc4dc3 2008-08-17 20:05 +0000 davis
98
- Initialized merge tracking via "svnmerge" with revisions "1-146" from
99
-
100
- 181 1a7b63bacfee 2008-08-17 19:55 +0000 davis
101
- Initialized merge tracking via "svnmerge" with revisions "1-146" from
102
-
103
- 180 f9cd915ea427 2008-03-18 02:32 +0000 davis
104
- merged ruby-pg/trunk rev 123:146 with ruby-pg/branches/stable
105
-
106
- 179 bae01401c92b 2008-03-17 21:29 +0000 davis
107
- merged ruby-pg/trunk rev 123:125 with ruby-pg/branches/stable
108
-
109
- 178 83e5013eccc8 2008-02-05 19:23 +0000 davis
110
- merged ruby-pg/trunk rev 109:121 with ruby-pg/branches/stable
111
-
112
- 177 abfe9a457946 2008-01-28 18:50 +0000 davis
113
- merged ruby-pg/trunk rev 104 with ruby-pg/branches/stable
114
-
115
- 176 c7ddb58579d3 2008-01-24 23:07 +0000 davis
116
- moved a few minor changes over before release
117
-
118
- 175 8df9da92380e 2008-01-24 18:45 +0000 davis
119
- merged revision 77:HEAD of ruby-pg/trunk to ruby-pg/branches/stable
120
-
121
- 174 8eb1346cb9aa 2008-01-09 02:08 +0000 davis
122
- removed extra directory that was left in the merge
123
-
124
- 173 d6d19e5371d4 2008-01-09 01:59 +0000 davis
125
- merged ruby-pg/trunk rev 69 to ruby-pg/branches/stable
126
-
127
- 172:-1 7716d24a143b 2008-01-07 22:16 +0000 davis
128
- Split 'ruby-pg' module and 'postgres' module
129
-
130
- 171 9d8f82721f69 2010-10-29 08:09 -0700 ged
91
+ 190 9d8f82721f69 2010-10-29 08:09 -0700 ged
131
92
  Updated to RSpec 2.0
132
93
 
133
- 170 b2df89600d95 2010-10-11 09:24 -0700 ged
94
+ 189:186 b2df89600d95 2010-10-11 09:24 -0700 ged
134
95
  Fixes for windows static build.
135
96
 
136
- 169 49ff3442c2ee 2010-10-08 07:23 -0700 ged
97
+ 188 193043bf2244 2010-10-08 09:40 -0700 ged
98
+ Added support for the payload of NOTIFY events (w/Mahlon E. Smith)
99
+
100
+ 187 ce9b893ff824 2010-10-08 07:25 -0700 ged
101
+ start new patch on default
102
+
103
+ 186 49ff3442c2ee 2010-10-08 07:23 -0700 ged
137
104
  Fixes to get the static windows build to work with PostgreSQL 9.0 and OpenSSL 1.0.0a
138
105
 
139
- 168 1fa5cd6851e3 2010-09-28 09:10 -0700 ged
106
+ 185 1fa5cd6851e3 2010-09-28 09:10 -0700 ged
140
107
  More work trying to get the native windows gem to compile under PostgreSQL 9.0
141
108
 
142
- 167 c9fb855a7d50 2010-09-28 09:09 -0700 ged
109
+ 184 c9fb855a7d50 2010-09-28 09:09 -0700 ged
143
110
  Adding a sample of how to use COPY FROM
144
111
 
145
- 166 d85ff87e5949 2010-09-24 10:34 -0700 ged
112
+ 183 d85ff87e5949 2010-09-24 10:34 -0700 ged
146
113
  Fixes for Ruby 1.9.2.
147
114
 
148
- 165 5dbc24f596c8 2010-09-24 10:18 -0700 ged
115
+ 182 5dbc24f596c8 2010-09-24 10:18 -0700 ged
149
116
  Version bump, updates for PostgreSQL 9.
150
117
 
151
- 164 1f8dd92ca16c 2010-08-03 10:31 -0700 ged
118
+ 181 1f8dd92ca16c 2010-08-03 10:31 -0700 ged
152
119
  Merged JRuby fix into the build system, pulled down other build-system updates. Thanks to timfel for the fix.
153
120
 
154
- 163 4f705f605e51 2010-08-03 17:56 +0200 timfelgentreff
121
+ 180 4f705f605e51 2010-08-03 17:56 +0200 timfelgentreff
155
122
  Fix to allow Rakefile to work on JRuby
156
123
 
157
- 162 92cc211ef553 2010-08-02 09:28 -0700 ged
124
+ 179 92cc211ef553 2010-08-02 09:28 -0700 ged
158
125
  Honor Ruby's default_internal encoding when connecting via the synchronous interface; fixes #33
159
126
 
160
- 161 a2237e39d399 2010-08-02 09:23 -0700 ged
127
+ 178 a2237e39d399 2010-08-02 09:23 -0700 ged
161
128
  Don't treat the installed pg_config not having archflags as an error; fixes #39
162
129
 
163
- 160 14b882b7b88c 2010-08-02 09:21 -0700 ged
130
+ 177 14b882b7b88c 2010-08-02 09:21 -0700 ged
164
131
  Install extension under arch-specific directory (RPS fix)
165
132
 
166
- 159 b0a5ae858569 2010-07-26 19:46 -0700 ged
133
+ 176 b0a5ae858569 2010-07-26 19:46 -0700 ged
167
134
  Adding rake tasklibs as a sub-repo
168
135
 
169
- 158 37835e3b8701 2010-07-21 18:39 -0700 ged
136
+ 175 37835e3b8701 2010-07-21 18:39 -0700 ged
170
137
  Removed spec for issue #22, as the library is behaving the same as the underlying library; closes #22
171
138
 
172
- 157:156,155 86f238c12fa3 2010-07-21 18:36 -0700 ged
139
+ 174:168,173 86f238c12fa3 2010-07-21 18:36 -0700 ged
173
140
  Merged with 168:dfaa59767b2e
174
141
 
175
- 156:150 dfaa59767b2e 2010-07-21 18:35 -0700 ged
176
- Reworded an example's description and added a specific transaction-abort spec
177
-
178
- 155:154,151 e756f8fb15d8 2010-06-22 16:23 -0700 ged
142
+ 173:172,169 e756f8fb15d8 2010-06-22 16:23 -0700 ged
179
143
  Merged with 170:5418a1d86d91
180
144
 
181
- 154 8922f0a8ee44 2010-06-22 16:22 -0700 ged
145
+ 172 8922f0a8ee44 2010-06-22 16:22 -0700 ged
182
146
  Adding example of invalid binary data issue (refs #22), fixing EXT_SO path
183
147
 
184
- 153 cb92aa4b6599 2010-02-25 10:39 -0800 ged
148
+ 171 cb92aa4b6599 2010-02-25 10:39 -0800 ged
185
149
  Adding a spec to test bug #12
186
150
 
187
- 152:141 86026f5ecf70 2010-02-25 10:39 -0800 ged
151
+ 170:158 86026f5ecf70 2010-02-25 10:39 -0800 ged
188
152
  Adding rake-compiler to the dev dependencies
189
153
 
190
- 151 5418a1d86d91 2010-06-22 15:54 -0700 ged
154
+ 169:167 5418a1d86d91 2010-06-22 15:54 -0700 ged
191
155
  Cross-compile tasks cleanup, extconf diagnostic improvement.
192
156
 
193
- 150 07502a793f3a 2010-06-22 10:44 -0700 ged
157
+ 168 dfaa59767b2e 2010-07-21 18:35 -0700 ged
158
+ Reworded an example's description and added a specific transaction-abort spec
159
+
160
+ 167 07502a793f3a 2010-06-22 10:44 -0700 ged
194
161
  Adding some more stuff to the ignorefile
195
162
 
196
- 149 873867122e80 2010-06-22 10:43 -0700 ged
163
+ 166 873867122e80 2010-06-22 10:43 -0700 ged
197
164
  Modified the large-object sample script to reflect the pg library's API (refs #35)
198
165
 
199
- 148 ea6eae59e917 2010-06-21 11:08 -0700 ged
166
+ 165 ea6eae59e917 2010-06-21 11:08 -0700 ged
200
167
  Updating build system, adding .orig files to ignore list.
201
168
 
202
- 147 bb8a3baad96e 2010-06-14 13:57 -0700 ged
169
+ 164 bb8a3baad96e 2010-06-14 13:57 -0700 ged
203
170
  Whitespace fix
204
171
 
205
- 146 45e6518b780d 2010-05-26 09:33 -0700 ged
172
+ 163 45e6518b780d 2010-05-26 09:33 -0700 ged
206
173
  Actually, just use the cflags from pg_config, which should resolve both the -Wall and the -lsocket issue (refs #30)
207
174
 
208
- 145 730fb885ce08 2010-05-26 09:27 -0700 ged
175
+ 162 730fb885ce08 2010-05-26 09:27 -0700 ged
209
176
  Fixing compilation for non-GCC platforms (fixes #30)
210
177
 
211
- 144 a47ffe890970 2010-03-16 07:36 -0700 ged
178
+ 161 a47ffe890970 2010-03-16 07:36 -0700 ged
212
179
  Fixed typo in ext/extconf.rb -- thanks to Keith Cascio for spotting this. Closes #27.
213
180
 
214
- 143 9a296096f7e9 2010-02-28 08:56 -0800 ged
181
+ 160 9a296096f7e9 2010-02-28 08:56 -0800 ged
215
182
  Added tag 0.9.0 for changeset da726282493c
216
183
 
217
- 142[0.9.0] da726282493c 2010-02-28 08:56 -0800 ged
184
+ 159[0.9.0] da726282493c 2010-02-28 08:56 -0800 ged
218
185
  Added signature for changeset 872063e42b12
219
186
 
220
- 141 872063e42b12 2010-02-19 08:02 -0800 ged
187
+ 158 872063e42b12 2010-02-19 08:02 -0800 ged
221
188
  Adding "fat gem" compatible loader, set the default RUBY_CC_VERSION.
222
189
 
223
- 140 ab525ca90531 2010-02-19 06:27 -0800 ged
190
+ 157 ab525ca90531 2010-02-19 06:27 -0800 ged
224
191
  Updated the Rakefile so it includes itself in gems. (closes #15) Thanks to flameeyes@bitbucket for
225
192
 
226
- 139 9c65eb905416 2010-02-18 06:52 -0800 ged
193
+ 156 9c65eb905416 2010-02-18 06:52 -0800 ged
227
194
  Applied patch for PGconn#async_exec to make it have the same semantics as PGconn#exec (closes #19). Thanks again to Lars Kanis for the patch.
228
195
 
229
- 138 b0017ac0ecb5 2010-02-17 15:30 -0800 ged
196
+ 155 b0017ac0ecb5 2010-02-17 15:30 -0800 ged
230
197
  Updated the Rakefile to always default the package version even if a version can't be read from the VERSION_FILE.
231
198
 
232
- 137 c7d5458af696 2010-02-17 06:23 -0800 ged
199
+ 154 c7d5458af696 2010-02-17 06:23 -0800 ged
233
200
  Improving spec database setup function (closes #18). Thanks to Lars Kanis for another fine patch.
234
201
 
235
- 136 39b11474d035 2010-02-17 06:14 -0800 ged
202
+ 153 39b11474d035 2010-02-17 06:14 -0800 ged
236
203
  Ack! Removing typo
237
204
 
238
- 135 9d54bbc98488 2010-02-17 06:10 -0800 ged
205
+ 152 9d54bbc98488 2010-02-17 06:10 -0800 ged
239
206
  Adding a test to ensure the result encoding remains the same even when client_encoding in the connection changes.
240
207
 
241
- 134 31afece7c203 2010-01-18 09:15 -0800 ged
208
+ 151 31afece7c203 2010-01-18 09:15 -0800 ged
242
209
  Made the 'make_header' in the extconf more clear.
243
210
 
244
- 133:132,131 d9c920068712 2010-01-13 20:56 -0800 pgsql
211
+ 150:149,148 d9c920068712 2010-01-13 20:56 -0800 pgsql
245
212
  Merged
246
213
 
247
- 132:124 294eb6d5530b 2010-01-13 20:51 -0800 pgsql
214
+ 149:141 294eb6d5530b 2010-01-13 20:51 -0800 pgsql
248
215
  In rspec tests, replace the pattern:
249
216
 
250
- 131 74fab32c2687 2010-01-11 08:15 -0800 ged
217
+ 148 74fab32c2687 2010-01-11 08:15 -0800 ged
251
218
  A better fix for the PGconn#block weirdness on Win32 (closes #16).
252
219
 
253
- 130 f8dfc1b6c51c 2010-01-06 06:17 -0800 ged
220
+ 147 f8dfc1b6c51c 2010-01-06 06:17 -0800 ged
254
221
  Rearranged the sections of the README.
255
222
 
256
- 129 0df792de2a19 2010-01-05 08:48 -0800 ged
223
+ 146 0df792de2a19 2010-01-05 08:48 -0800 ged
257
224
  Updating MacOS X README.
258
225
 
259
- 128 2894973bc63f 2010-01-04 18:28 -0800 ged
226
+ 145 2894973bc63f 2010-01-04 18:28 -0800 ged
260
227
  Work around broken rb_thread_select() on win32; thanks to Lars Kanis for the patch!
261
228
 
262
- 127 88dacdb9c97d 2010-01-04 18:16 -0800 ged
229
+ 144 88dacdb9c97d 2010-01-04 18:16 -0800 ged
263
230
  Reverted removal of PGresult::InvalidOid, fixed broken spec.
264
231
 
265
- 126 739cec560448 2010-01-04 17:55 -0800 ged
232
+ 143 739cec560448 2010-01-04 17:55 -0800 ged
266
233
  Ignore some generated files, documentation work, removed type OID constants.
267
234
 
268
- 125 38a0d2a90664 2010-01-04 17:39 -0800 ged
235
+ 142 38a0d2a90664 2010-01-04 17:39 -0800 ged
269
236
  Applied patch for static cross-compilation of win32 gem from Lars Kanis with a few changes to
270
237
 
271
- 124 f31202539234 2010-01-03 11:40 -0800 ged
238
+ 141 f31202539234 2010-01-03 11:40 -0800 ged
272
239
  Updated build system
273
240
 
274
- 123 cc09390cb0a8 2010-01-02 09:22 -0800 ged
241
+ 140:138 cc09390cb0a8 2010-01-02 09:22 -0800 ged
275
242
  Added tag 0.8.0 for changeset 7fbe4187e9e5
276
243
 
277
- 122 05834d47aac3 2009-12-31 09:57 -0800 ged
244
+ 139:136 d5fa3e079a55 2009-12-31 09:58 -0800 ged
245
+ Closing branch
246
+
247
+ 138 05834d47aac3 2009-12-31 09:57 -0800 ged
278
248
  Bumped version to 0.9.0
279
249
 
280
- 121:110,120 0997a0aa7624 2009-12-31 09:22 -0800 ged
250
+ 137:126,136 0997a0aa7624 2009-12-31 09:22 -0800 ged
281
251
  Merged i17n-19-patches branch
282
252
 
283
- 120 f5af71167dea 2009-12-28 14:50 -0800 ged
253
+ 136 f5af71167dea 2009-12-28 14:50 -0800 ged
284
254
  Make PGconn.connect_start use PQconnectStart instead of PQconnectdb so asynchronous connection
285
255
 
286
- 119 42919e2a4ef8 2009-12-28 08:42 -0800 ged
256
+ 135 42919e2a4ef8 2009-12-28 08:42 -0800 ged
287
257
  Added column-selection methods to PGresult (#field_values and #column_values). Closes #12. Thanks to
288
258
 
289
- 118 39fdb2552163 2009-12-23 08:28 -0800 ged
259
+ 134 39fdb2552163 2009-12-23 08:28 -0800 ged
290
260
  Fixed #11: encrypt_arguments doesn't receive password, thanks to Yuki Miyauchi for the patch.
291
261
 
292
- 117 df770b6ad237 2009-12-23 07:49 -0800 ged
262
+ 133 df770b6ad237 2009-12-23 07:49 -0800 ged
293
263
  Fixed infinite loop in async_exec("COPY"), thanks to Mike Pomraning for the patch. Closes #9.
294
264
 
295
- 116 4cbcf197cb82 2009-12-16 09:03 -0800 ged
265
+ 132 4cbcf197cb82 2009-12-16 09:03 -0800 ged
296
266
  New build system, build with rake-compiler, added PGconn::VERSION.
297
267
 
298
- 115 6ba661bbdb28 2009-12-15 08:45 -0800 ged
268
+ 131 6ba661bbdb28 2009-12-15 08:45 -0800 ged
299
269
  Applied Rubyforge patch 26282; fixes #1. Thanks to Nikolai Lugovoi for the patch.
300
270
 
301
- 114 3e42badc15de 2009-12-11 17:28 -0800 ged
271
+ 130 3e42badc15de 2009-12-11 17:28 -0800 ged
302
272
  Notify spec fixes, cleanup, Rakefile clean task adjustments.
303
273
 
304
- 113 659d80221a45 2009-12-11 13:47 -0800 ged
274
+ 129 659d80221a45 2009-12-11 13:47 -0800 ged
305
275
  Simplified the spec for PGconn#notify, still segfaulting.
306
276
 
307
- 112:111,110 26b614a7ece8 2009-12-11 09:01 -0800 ged
277
+ 128:127,126 26b614a7ece8 2009-12-11 09:01 -0800 ged
308
278
  Merged Mahlon's examples-directory patch from default.
309
279
 
310
- 111:108,109 66234afab283 2009-12-11 09:01 -0800 ged
280
+ 127:124,125 66234afab283 2009-12-11 09:01 -0800 ged
311
281
  Merged Mahlon's notify patch from default.
312
282
 
313
- 110 1e6349a799c3 2009-12-10 10:30 -0800 mahlon
283
+ 126 1e6349a799c3 2009-12-10 10:30 -0800 mahlon
314
284
  Add a sample (usage example) for wait_for_notify().
315
285
 
316
- 109:98 a3434e641f6a 2009-12-10 10:22 -0800 mahlon
286
+ 125:114 a3434e641f6a 2009-12-10 10:22 -0800 mahlon
317
287
  * Small documentation fix for conn.notifies()
318
288
 
319
- 108 59549227d7c3 2009-10-29 06:10 -0700 ged
289
+ 124 59549227d7c3 2009-10-29 06:10 -0700 ged
320
290
  Remove old mkrf config file to avoid confusion
321
291
 
322
- 107 f30139fb0587 2009-10-28 18:14 -0700 ged
292
+ 123 f30139fb0587 2009-10-28 18:14 -0700 ged
323
293
  Write specs for and applied patch #26283; thanks to Nikolai Lugovoi.
324
294
 
325
- 106 a41d4291ffbb 2009-10-28 16:26 -0700 ged
295
+ 122 a41d4291ffbb 2009-10-28 16:26 -0700 ged
326
296
  Fixups after conversion to Mercurial, fixing tests broken by the changes in the previous commit.
327
297
 
328
- 105 91ee1ac36a54 2009-10-28 14:51 +0000 ged
298
+ 121 91ee1ac36a54 2009-10-28 14:51 +0000 ged
329
299
  * Made spec output elide output from the command line by default, and log everything for
330
300
 
331
- 104 0b28f9bd8935 2009-10-17 21:42 +0000 ged
301
+ 120 0b28f9bd8935 2009-10-17 21:42 +0000 ged
332
302
  Applied patch #26277; thanks to Nikolai Lugovoi.
333
303
 
334
- 103 cb5335861c5d 2009-10-16 20:50 +0000 ged
304
+ 119 cb5335861c5d 2009-10-16 20:50 +0000 ged
335
305
  Build and warnings cleanup.
336
306
 
337
- 102 1d001b550715 2009-08-28 10:50 +0000 ged
307
+ 118 1d001b550715 2009-08-28 10:50 +0000 ged
338
308
  Applied patch #26116; thanks to Nikolai Lugovoi.
339
309
 
340
- 101 d67c62945540 2009-08-28 06:22 +0000 ged
310
+ 117 d67c62945540 2009-08-28 06:22 +0000 ged
341
311
  * Use pg_ctl -w instead of sleep for specs
342
312
 
343
- 100 0524dd20fb0f 2009-08-25 00:35 +0000 ged
313
+ 116 0524dd20fb0f 2009-08-25 00:35 +0000 ged
344
314
  * Applied patch from (rubyforge:25931), fixes (rubyforge:22925).
345
315
 
346
- 99 d0267176eb61 2009-07-30 15:52 +0000 ged
316
+ 115 d0267176eb61 2009-07-30 15:52 +0000 ged
347
317
  Making a branch for merging the patches and new specs to test them.
348
318
 
349
- 98[0.8.0] 7fbe4187e9e5 2009-03-28 22:53 +0000 davis
319
+ 114[0.8.0] 7fbe4187e9e5 2009-03-28 22:53 +0000 davis
350
320
  Bump version to 0.8.0
351
321
 
352
- 97 39a19c65b0a0 2009-03-28 19:39 +0000 cfis
322
+ 113 39a19c65b0a0 2009-03-28 19:39 +0000 cfis
353
323
  Don't call file trace on windows.
354
324
 
355
- 96 c4598eee6d1b 2009-03-28 19:33 +0000 cfis
325
+ 112 c4598eee6d1b 2009-03-28 19:33 +0000 cfis
356
326
  Updated VC2008 project
357
327
 
358
- 95 c75883fb5979 2009-03-28 19:32 +0000 cfis
328
+ 111 c75883fb5979 2009-03-28 19:32 +0000 cfis
359
329
  Updated VC2008 project
360
330
 
361
- 94 4192e6d1ccc0 2009-03-28 16:49 +0000 davis
331
+ 110 4192e6d1ccc0 2009-03-28 16:49 +0000 davis
362
332
  Fix socket leak when connection error occurs.
363
333
 
364
- 93 03d6ef0de9ef 2009-03-28 15:42 +0000 davis
334
+ 109 03d6ef0de9ef 2009-03-28 15:42 +0000 davis
365
335
  PGconn#lo_close was calling lo_unlink.
366
336
 
367
- 92 b27b4b4a54eb 2009-03-28 15:37 +0000 davis
337
+ 108 b27b4b4a54eb 2009-03-28 15:37 +0000 davis
368
338
  Change header so it builds correctly on 1.8 and 1.9.
369
339
 
370
- 91 f7b97416c101 2009-03-14 09:22 +0000 cfis
340
+ 107 f7b97416c101 2009-03-14 09:22 +0000 cfis
371
341
  Oops - use ALLOC_N not ALLOC, fixes compile error with VC2008.
372
342
 
373
- 90 c0fd7531850f 2009-03-14 09:14 +0000 cfis
343
+ 106 c0fd7531850f 2009-03-14 09:14 +0000 cfis
374
344
  Ignore rdoc directory, pkg directory, nbproject directory.
375
345
 
376
- 89 c675c7534c4d 2009-03-14 09:13 +0000 cfis
346
+ 105 c675c7534c4d 2009-03-14 09:13 +0000 cfis
377
347
  This rakefile is just used for installing the windows gem.
378
348
 
379
- 88 c3329724ef5b 2009-03-14 09:13 +0000 cfis
349
+ 104 c3329724ef5b 2009-03-14 09:13 +0000 cfis
380
350
  Split out building on mingw to a separate rake file.
381
351
 
382
- 87 01e1dbb950c8 2009-03-14 09:12 +0000 cfis
352
+ 103 01e1dbb950c8 2009-03-14 09:12 +0000 cfis
383
353
  Updated VC2008 projects for Ruby 1.8 and Ruby 1.9 (1.9 not quite setup yet).
384
354
 
385
- 86 677d3eae5b16 2009-03-14 09:11 +0000 cfis
355
+ 102 677d3eae5b16 2009-03-14 09:11 +0000 cfis
386
356
  Added rdoc task so you can type rake rdoc. Makes it easier to debug rdoc documentation.
387
357
 
388
- 85 c33a73c14126 2009-03-14 08:54 +0000 cfis
358
+ 101 c33a73c14126 2009-03-14 08:54 +0000 cfis
389
359
  Windows compatibility - use tcp/ip sockets, use full path names, read files in binary mode.
390
360
 
391
- 84 241d3410b875 2009-03-14 08:48 +0000 cfis
361
+ 100 241d3410b875 2009-03-14 08:48 +0000 cfis
392
362
  Ripple port change through text. Always full path to open spec file.
393
363
 
394
- 83 1bf29d30c16c 2009-03-14 08:29 +0000 cfis
364
+ 99 1bf29d30c16c 2009-03-14 08:29 +0000 cfis
395
365
  First stab at getting test to work on Windows. Windows does not support unix-sockets, so have to use tcp/ip sockets. Also windows requires that command line parameters are quoted with " and not '.
396
366
 
397
- 82 4dae2cabb5ae 2009-03-14 07:47 +0000 cfis
367
+ 98 4dae2cabb5ae 2009-03-14 07:47 +0000 cfis
398
368
  Export Init_pg in windows shared library.
399
369
 
400
- 81 4e9b028c55cd 2009-03-14 07:46 +0000 cfis
370
+ 97 4e9b028c55cd 2009-03-14 07:46 +0000 cfis
401
371
  Fix up memory handling for Windows (match ALLOC with xfree).
402
372
 
403
- 80 4a9ffd0aa913 2009-03-06 18:18 +0000 davis
373
+ 96 4a9ffd0aa913 2009-03-06 18:18 +0000 davis
404
374
  1.9 compatibility fixes.
405
375
 
406
- 79 7178d13749b7 2008-12-03 06:52 +0000 davis
376
+ 95:93 7178d13749b7 2008-12-03 06:52 +0000 davis
407
377
  Add better support for windows build.
408
378
 
409
- 78 3bf9ef75bae5 2008-10-14 05:25 +0000 davis
379
+ 94:92 4c2ea65f2eb9 2008-10-14 05:27 +0000 davis
380
+ Merged revisions 175 via svnmerge from
381
+
382
+ 93:91 3bf9ef75bae5 2008-10-14 05:25 +0000 davis
410
383
  Revert r172.
411
384
 
412
- 77 cdf306d84adf 2008-10-05 19:18 +0000 davis
385
+ 92:86 7e7c22be0302 2008-10-05 19:43 +0000 davis
386
+ Merged revisions 169-173 via svnmerge from
387
+
388
+ 91 cdf306d84adf 2008-10-05 19:18 +0000 davis
413
389
  Update spec tests.
414
390
 
415
- 76 0386537bd139 2008-10-05 19:04 +0000 davis
391
+ 90 0386537bd139 2008-10-05 19:04 +0000 davis
416
392
  Include all libraries listed in "pg_config --libs" in the build.
417
393
 
418
- 75 68473ee45e28 2008-10-05 18:47 +0000 davis
394
+ 89 68473ee45e28 2008-10-05 18:47 +0000 davis
419
395
  Fix PGconn#async_exec and PGconn#get_last_result to properly clear all
420
396
 
421
- 74 622eec9c6b0b 2008-10-05 18:01 +0000 davis
397
+ 88 622eec9c6b0b 2008-10-05 18:01 +0000 davis
422
398
  Throw correct exception when result is NULL.
423
399
 
424
- 73 8e8045947a9c 2008-08-21 02:48 +0000 davis
400
+ 87:85 8e8045947a9c 2008-08-21 02:48 +0000 davis
425
401
  Fixed option connection argument in the case of using 7 arguments.
426
402
 
427
- 72 c5c44a6267f7 2008-08-17 20:35 +0000 davis
403
+ 86:84 3e9dda291ef3 2008-08-17 20:42 +0000 davis
404
+ Merged revisions 166 via svnmerge from
405
+
406
+ 85:80 c5c44a6267f7 2008-08-17 20:35 +0000 davis
428
407
  Typo fix.
429
408
 
430
- 71 ed8927d7f45d 2008-08-17 19:26 +0000 davis
409
+ 84 3686c9944fe1 2008-08-17 20:27 +0000 davis
410
+ Add ext_helper.rb
411
+
412
+ 83 ed3294b76bf7 2008-08-17 20:23 +0000 davis
413
+ Merged revisions 149-160 via svnmerge from
414
+
415
+ 82 ff6af5fc4dc3 2008-08-17 20:05 +0000 davis
416
+ Initialized merge tracking via "svnmerge" with revisions "1-146" from
417
+
418
+ 81:68 1a7b63bacfee 2008-08-17 19:55 +0000 davis
419
+ Initialized merge tracking via "svnmerge" with revisions "1-146" from
420
+
421
+ 80 ed8927d7f45d 2008-08-17 19:26 +0000 davis
431
422
  Properly protect variables from garbage collection, preventing possible memory
432
423
 
433
- 70 c7c5d25c851c 2008-08-17 18:19 +0000 davis
424
+ 79 c7c5d25c851c 2008-08-17 18:19 +0000 davis
434
425
  Applied build patch from Brett Neumeier. Thanks!
435
426
 
436
- 69 48d2bdfcc630 2008-07-24 05:46 +0000 davis
427
+ 78 48d2bdfcc630 2008-07-24 05:46 +0000 davis
437
428
  Fixed PGconn#setnonblocking
438
429
 
439
- 68 b2e1bc03aca5 2008-07-24 05:33 +0000 davis
430
+ 77 b2e1bc03aca5 2008-07-24 05:33 +0000 davis
440
431
  Changed all temporary allocations to use ALLOC_N (heap
441
432
 
442
- 67 c775c24a75f9 2008-07-08 06:21 +0000 davis
433
+ 76 c775c24a75f9 2008-07-08 06:21 +0000 davis
443
434
  Fix oversight in connect arguments for options and connect_timeout
444
435
 
445
- 66 b86f0f75181e 2008-04-21 17:41 +0000 davis
436
+ 75 b86f0f75181e 2008-04-21 17:41 +0000 davis
446
437
  * backtracked a small piece of the patch, to catch
447
438
 
448
- 65 b3a05d09fb27 2008-04-21 17:24 +0000 davis
439
+ 74 b3a05d09fb27 2008-04-21 17:24 +0000 davis
449
440
  * applied patch from Louis Lavena to improve
450
441
 
451
- 64 7579885aff18 2008-04-21 17:13 +0000 davis
442
+ 73 7579885aff18 2008-04-21 17:13 +0000 davis
452
443
  * added some tests for binary data
453
444
 
454
- 63 de58e242dd99 2008-03-20 19:16 +0000 davis
445
+ 72 de58e242dd99 2008-03-20 19:16 +0000 davis
455
446
  * added PGconn#cancel() -> String
456
447
 
457
- 62 778892302876 2008-03-20 18:20 +0000 davis
448
+ 71 778892302876 2008-03-20 18:20 +0000 davis
458
449
  * added PGconn.connect_start(...) -> PGconn
459
450
 
460
- 61 630cca5e74c1 2008-03-19 21:19 +0000 davis
451
+ 70 630cca5e74c1 2008-03-19 21:19 +0000 davis
461
452
  * forgot to add the expected output to the repository,
462
453
 
463
- 60 661ed2fea9e2 2008-03-19 21:17 +0000 davis
454
+ 69:67 661ed2fea9e2 2008-03-19 21:17 +0000 davis
464
455
  This commmit just cleans up indenting and coding
465
456
 
466
- 59 d821d50b7d95 2008-03-17 21:34 +0000 davis
457
+ 68:65 f9cd915ea427 2008-03-18 02:32 +0000 davis
458
+ merged ruby-pg/trunk rev 123:146 with ruby-pg/branches/stable
459
+
460
+ 67 d821d50b7d95 2008-03-17 21:34 +0000 davis
467
461
  re-adding mkrf_config.rb
468
462
 
469
- 58 a66f44648857 2008-03-17 21:33 +0000 davis
463
+ 66:64 a66f44648857 2008-03-17 21:33 +0000 davis
470
464
  temporarily removing mkrf_config.rb and will re-add it in the
471
465
 
472
- 57 c8752b1a33cd 2008-03-17 17:29 +0000 davis
466
+ 65:43 bae01401c92b 2008-03-17 21:29 +0000 davis
467
+ merged ruby-pg/trunk rev 123:125 with ruby-pg/branches/stable
468
+
469
+ 64 c8752b1a33cd 2008-03-17 17:29 +0000 davis
473
470
  * 7.3 compatibility fixes
474
471
 
475
- 56 4aa1190e1873 2008-03-17 16:19 +0000 davis
472
+ 63 4aa1190e1873 2008-03-17 16:19 +0000 davis
476
473
  * Added PGconn#reset_start
477
474
 
478
- 55 1224350cdcb6 2008-03-12 17:39 +0000 davis
475
+ 62 1224350cdcb6 2008-03-12 17:39 +0000 davis
479
476
  * added SQLSTATE test
480
477
 
481
- 54 639f8bf03621 2008-03-12 16:40 +0000 davis
478
+ 61 639f8bf03621 2008-03-12 16:40 +0000 davis
482
479
  * updated the README to reflect the fact that the pg
483
480
 
484
- 53 1fd6244025c5 2008-03-11 21:35 +0000 davis
481
+ 60 1fd6244025c5 2008-03-11 21:35 +0000 davis
485
482
  * tried to make it easier to find the license information
486
483
 
487
- 52 1c4f58ec2264 2008-03-10 23:55 +0000 davis
484
+ 59 1c4f58ec2264 2008-03-10 23:55 +0000 davis
488
485
  * add better checking to make sure that PGconn#trace is passed
489
486
 
490
- 51 e94ce7f92a06 2008-03-10 18:14 +0000 davis
487
+ 58 e94ce7f92a06 2008-03-10 18:14 +0000 davis
491
488
  * corrected handling of bytea when passed in binary format
492
489
 
493
- 50 221e68f16f2d 2008-03-10 17:54 +0000 davis
490
+ 57 221e68f16f2d 2008-03-10 17:54 +0000 davis
494
491
  * make PGconn#trace accept any object that provides
495
492
 
496
- 49 2e722b22b4bc 2008-03-10 17:34 +0000 davis
493
+ 56 2e722b22b4bc 2008-03-10 17:34 +0000 davis
497
494
  * Added PGconn#trace(filename)
498
495
 
499
- 48 9b1308e85390 2008-03-07 18:11 +0000 davis
496
+ 55 9b1308e85390 2008-03-07 18:11 +0000 davis
500
497
  * Added check to find pg_config. If not found, throw an error.
501
498
 
502
- 47 480eae4733ff 2008-02-22 01:26 +0000 davis
499
+ 54 480eae4733ff 2008-02-22 01:26 +0000 davis
503
500
  * fixed PGconn#trace
504
501
 
505
- 46 a6a1c8613b31 2008-02-21 01:05 +0000 davis
502
+ 53 a6a1c8613b31 2008-02-21 01:05 +0000 davis
506
503
  * added PGconn#set_notice_receiver{ |result| ... }
507
504
 
508
- 45 8a6e663a70f7 2008-02-19 19:25 +0000 davis
505
+ 52 8a6e663a70f7 2008-02-19 19:25 +0000 davis
509
506
  quick change
510
507
 
511
- 44 5fc41a8f71f0 2008-02-19 19:06 +0000 davis
508
+ 51 5fc41a8f71f0 2008-02-19 19:06 +0000 davis
512
509
  fix escaping of paths on windows (another try)
513
510
 
514
- 43 a465fe9f95a3 2008-02-18 19:32 +0000 davis
511
+ 50 a465fe9f95a3 2008-02-18 19:32 +0000 davis
515
512
  * attempted some compatibility fixes for windows
516
513
 
517
- 42 5a91f5660c17 2008-02-13 01:24 +0000 davis
514
+ 49 5a91f5660c17 2008-02-13 01:24 +0000 davis
518
515
  * better quoting and error handling when invoking other programs,
519
516
 
520
- 41 5289d5034472 2008-02-13 01:10 +0000 davis
517
+ 48 5289d5034472 2008-02-13 01:10 +0000 davis
521
518
  quote include and library paths
522
519
 
523
- 40 ed53517514b1 2008-02-13 00:22 +0000 davis
520
+ 47 ed53517514b1 2008-02-13 00:22 +0000 davis
524
521
  * created a mkrf_config.rb. I am attempting to transition away from
525
522
 
526
- 39 21bf96d0f702 2008-02-11 18:35 +0000 davis
523
+ 46 21bf96d0f702 2008-02-11 18:35 +0000 davis
527
524
  * windows fixes (thanks Daniel Berger!)
528
525
 
529
- 38 9d0a23cf2113 2008-02-11 17:43 +0000 davis
526
+ 45 9d0a23cf2113 2008-02-11 17:43 +0000 davis
530
527
  * fix temporary postgresql test installation in
531
528
 
532
- 37 7fcd53437c79 2008-02-08 18:27 +0000 davis
529
+ 44:42 7fcd53437c79 2008-02-08 18:27 +0000 davis
533
530
  * properly retrieve binary data from result sets
534
531
 
535
- 36 295c477ed74f 2008-02-05 17:56 +0000 davis
532
+ 43:31 83e5013eccc8 2008-02-05 19:23 +0000 davis
533
+ merged ruby-pg/trunk rev 109:121 with ruby-pg/branches/stable
534
+
535
+ 42 295c477ed74f 2008-02-05 17:56 +0000 davis
536
536
  fixed bug caused by a typo. HAVE_LOCREATE should have been HAVE_LO_CREATE
537
537
 
538
- 35 ef2214d7f448 2008-02-01 19:33 +0000 davis
538
+ 41 ef2214d7f448 2008-02-01 19:33 +0000 davis
539
539
  * made exec, exec_prepared, send_query, and send_prepared with parameters
540
540
 
541
- 34 7303b8165a37 2008-02-01 18:29 +0000 davis
541
+ 40 7303b8165a37 2008-02-01 18:29 +0000 davis
542
542
  * Corrected a comment.
543
543
 
544
- 33 b3ad2112a91e 2008-01-31 22:11 +0000 davis
544
+ 39 b3ad2112a91e 2008-01-31 22:11 +0000 davis
545
545
  * removed duplicate definition of PGconn.open
546
546
 
547
- 32 ce9c0e52eec6 2008-01-31 21:41 +0000 davis
547
+ 38 ce9c0e52eec6 2008-01-31 21:41 +0000 davis
548
548
  more test improvements
549
549
 
550
- 31 97cbdebaeb11 2008-01-31 21:19 +0000 davis
550
+ 37 97cbdebaeb11 2008-01-31 21:19 +0000 davis
551
551
  renamed pg_spec to pgconn_spec
552
552
 
553
- 30 1cb0537730bf 2008-01-31 21:00 +0000 davis
553
+ 36 1cb0537730bf 2008-01-31 21:00 +0000 davis
554
554
  * Added some tests
555
555
 
556
- 29 29b827c7dbd0 2008-01-30 18:27 +0000 davis
556
+ 35 29b827c7dbd0 2008-01-30 18:27 +0000 davis
557
557
  * added PGconn.conndefaults
558
558
 
559
- 28 c18f38225bc7 2008-01-29 19:44 +0000 davis
559
+ 34 c18f38225bc7 2008-01-29 19:44 +0000 davis
560
560
  corrected the tainting of some strings returned by the database
561
561
 
562
- 27 56cd8c6ee046 2008-01-29 17:50 +0000 davis
562
+ 33 56cd8c6ee046 2008-01-29 17:50 +0000 davis
563
563
  changed gem name from 'ruby-pg' to just 'pg'
564
564
 
565
- 26 a9097dead780 2008-01-28 21:19 +0000 davis
565
+ 32:30 a9097dead780 2008-01-28 21:19 +0000 davis
566
566
  made a pg.gemspec so that people can build 'pg' gem
567
567
 
568
- 25 cfdcfcd445ab 2008-01-26 00:20 +0000 davis
568
+ 31:26 abfe9a457946 2008-01-28 18:50 +0000 davis
569
+ merged ruby-pg/trunk rev 104 with ruby-pg/branches/stable
570
+
571
+ 30 cfdcfcd445ab 2008-01-26 00:20 +0000 davis
569
572
  changed exception type for empty data structures
570
573
 
571
- 24 81cd03f8a2c3 2008-01-25 23:42 +0000 davis
574
+ 29 81cd03f8a2c3 2008-01-25 23:42 +0000 davis
572
575
  * added PGconn#async_exec and alias PGconn#async_query
573
576
 
574
- 23 29d775393e88 2008-01-25 00:59 +0000 davis
577
+ 28 29d775393e88 2008-01-25 00:59 +0000 davis
575
578
  added PGresult#cmdtuples as alias for PGresult#cmd_tuples
576
579
 
577
- 22 eac7df0aa291 2008-01-25 00:46 +0000 davis
580
+ 27:25 eac7df0aa291 2008-01-25 00:46 +0000 davis
578
581
  Added:
579
582
 
580
- 21 7908e778e7c3 2008-01-24 23:00 +0000 davis
583
+ 26:24 c7ddb58579d3 2008-01-24 23:07 +0000 davis
584
+ moved a few minor changes over before release
585
+
586
+ 25:23 7908e778e7c3 2008-01-24 23:00 +0000 davis
581
587
  Added README.windows and README.OS_X
582
588
 
583
- 20 7cc13a1f3010 2008-01-24 17:48 +0000 davis
589
+ 24:8 8df9da92380e 2008-01-24 18:45 +0000 davis
590
+ merged revision 77:HEAD of ruby-pg/trunk to ruby-pg/branches/stable
591
+
592
+ 23 7cc13a1f3010 2008-01-24 17:48 +0000 davis
584
593
  Another change to improve windows compatibility.
585
594
 
586
- 19 ee0577472b67 2008-01-24 02:07 +0000 davis
595
+ 22 ee0577472b67 2008-01-24 02:07 +0000 davis
587
596
  fixed typo
588
597
 
589
- 18 eaf3b1825d56 2008-01-24 02:05 +0000 davis
598
+ 21 eaf3b1825d56 2008-01-24 02:05 +0000 davis
590
599
  My previous fix for OS X compatibility didn't work well enough.
591
600
 
592
- 17 12b2568a0ada 2008-01-23 23:18 +0000 davis
601
+ 20 12b2568a0ada 2008-01-23 23:18 +0000 davis
593
602
  * had to include that file conditionally
594
603
 
595
- 16 34dd04d21a78 2008-01-23 23:04 +0000 davis
604
+ 19 34dd04d21a78 2008-01-23 23:04 +0000 davis
596
605
  * included an additional file so that it works with
597
606
 
598
- 15 4cf66b7302bf 2008-01-23 21:42 +0000 davis
607
+ 18 4cf66b7302bf 2008-01-23 21:42 +0000 davis
599
608
  * added PGconn.quote_ident to quote identifiers
600
609
 
601
- 14 081e4d8ee394 2008-01-22 18:48 +0000 davis
610
+ 17 081e4d8ee394 2008-01-22 18:48 +0000 davis
602
611
  * made PGconn#query alias for PGconn#exec
603
612
 
604
- 13 4774578059e1 2008-01-22 17:52 +0000 davis
613
+ 16 4774578059e1 2008-01-22 17:52 +0000 davis
605
614
  * Detect if compiling on OS X, and if so set $ARCHFLAGS correctly.
606
615
 
607
- 12 204f4b591614 2008-01-21 18:53 +0000 davis
616
+ 15 204f4b591614 2008-01-21 18:53 +0000 davis
608
617
  made conn.block cleaner and it should be more portable.
609
618
 
610
- 11 449d54289f07 2008-01-18 18:10 +0000 davis
619
+ 14 449d54289f07 2008-01-18 18:10 +0000 davis
611
620
  Miscellaneous changes:
612
621
 
613
- 10 aadd4008d2e3 2008-01-17 23:18 +0000 davis
622
+ 13 aadd4008d2e3 2008-01-17 23:18 +0000 davis
614
623
  started creating a rspec test, more tests to come later
615
624
 
616
- 9 4f276bb9c4b1 2008-01-17 23:11 +0000 davis
625
+ 12 4f276bb9c4b1 2008-01-17 23:11 +0000 davis
617
626
  properly free memory in conn.get_copy_data
618
627
 
619
- 8 95d9ff13c269 2008-01-15 21:24 +0000 davis
628
+ 11 95d9ff13c269 2008-01-15 21:24 +0000 davis
620
629
  Added conn.block( [ timeout ] ) -> Boolean
621
630
 
622
- 7 4cefa3b1ecbb 2008-01-14 23:23 +0000 davis
631
+ 10 4cefa3b1ecbb 2008-01-14 23:23 +0000 davis
623
632
  Added conn.transaction{ |conn| ... }
624
633
 
625
- 6 ae8c3b66c48d 2008-01-14 19:22 +0000 davis
634
+ 9:6 ae8c3b66c48d 2008-01-14 19:22 +0000 davis
626
635
  Support for PostgreSQL 7.3.
627
636
 
628
- 5 1fd8b2aaac4c 2008-01-08 23:19 +0000 davis
637
+ 8 8eb1346cb9aa 2008-01-09 02:08 +0000 davis
638
+ removed extra directory that was left in the merge
639
+
640
+ 7:0 d6d19e5371d4 2008-01-09 01:59 +0000 davis
641
+ merged ruby-pg/trunk rev 69 to ruby-pg/branches/stable
642
+
643
+ 6 1fd8b2aaac4c 2008-01-08 23:19 +0000 davis
629
644
  Added:
630
645
 
631
- 4 5c0a63028583 2008-01-08 22:26 +0000 davis
646
+ 5 5c0a63028583 2008-01-08 22:26 +0000 davis
632
647
  Added:
633
648
 
634
- 3 40270de77f48 2008-01-07 23:30 +0000 davis
649
+ 4 40270de77f48 2008-01-07 23:30 +0000 davis
635
650
  fixed a few method defines for async query processing
636
651
 
637
- 2 d05d9f2042d7 2008-01-07 22:52 +0000 davis
652
+ 3 d05d9f2042d7 2008-01-07 22:52 +0000 davis
638
653
  Change conn.exec to use PQexec if no parameters are passed,
639
654
 
640
- 1 a531a7bc9241 2008-01-07 22:31 +0000 davis
655
+ 2 a531a7bc9241 2008-01-07 22:31 +0000 davis
641
656
  Cleanup after the repository reorganization.
642
657
 
643
- 0 aafc8cf17567 2008-01-07 22:16 +0000 davis
658
+ 1:-1 aafc8cf17567 2008-01-07 22:16 +0000 davis
659
+ Split 'ruby-pg' module and 'postgres' module
660
+
661
+ 0 7716d24a143b 2008-01-07 22:16 +0000 davis
644
662
  Split 'ruby-pg' module and 'postgres' module
645
663
 
@@ -28,3 +28,5 @@ Jeff Davis <ruby@j-davis.com>
28
28
  Bertram Scharpf <software@bertram-scharpf.de>
29
29
  Michael Granger <ged@FaerieMUD.org>
30
30
  Mahlon E. Smith <mahlon@martini.nu>
31
+ Jason Yanowitz <me-bitbucket@jasonyanowitz.com>
32
+
data/ext/pg.c CHANGED
@@ -9,7 +9,7 @@
9
9
  modified at: Wed Jan 20 16:41:51 1999
10
10
 
11
11
  $Author: ged $
12
- $Date: 2010/12/06 16:45:23 $
12
+ $Date: 2011/02/23 19:40:51 $
13
13
  ************************************************/
14
14
 
15
15
  #include "pg.h"
@@ -17,13 +17,18 @@
17
17
  # define M17N_SUPPORTED
18
18
  #endif
19
19
 
20
+ #ifdef _WIN32
21
+ // for O_RDWR and O_BINARY
22
+ #include <fcntl.h>
23
+ #endif
24
+
20
25
  #define rb_define_singleton_alias(klass,new,old) rb_define_alias(rb_singleton_class(klass),new,old)
21
26
 
22
27
  static VALUE rb_cPGconn;
23
28
  static VALUE rb_cPGresult;
24
29
  static VALUE rb_ePGError;
25
30
 
26
- static const char *VERSION = "0.10.1";
31
+ static const char *VERSION = "0.11.0";
27
32
 
28
33
 
29
34
  /* The following functions are part of libpq, but not
@@ -2117,6 +2122,35 @@ pgconn_notifies(VALUE self)
2117
2122
  }
2118
2123
 
2119
2124
 
2125
+ #ifdef _WIN32
2126
+ void create_crt_fd(fd_set *os_set, fd_set *crt_set)
2127
+ {
2128
+ int i;
2129
+ crt_set->fd_count = os_set->fd_count;
2130
+ for (i = 0; i < os_set->fd_count; i++) {
2131
+ WSAPROTOCOL_INFO wsa_pi;
2132
+ /* dupicate the SOCKET */
2133
+ int r = WSADuplicateSocket(os_set->fd_array[i], GetCurrentProcessId(), &wsa_pi);
2134
+ SOCKET s = WSASocket(wsa_pi.iAddressFamily, wsa_pi.iSocketType, wsa_pi.iProtocol, &wsa_pi, 0, 0);
2135
+ /* create the CRT fd so ruby can get back to the SOCKET */
2136
+ int fd = _open_osfhandle(s, O_RDWR|O_BINARY);
2137
+ os_set->fd_array[i] = s;
2138
+ crt_set->fd_array[i] = fd;
2139
+ }
2140
+ }
2141
+
2142
+ void cleanup_crt_fd(fd_set *os_set, fd_set *crt_set)
2143
+ {
2144
+ int i;
2145
+ for (i = 0; i < os_set->fd_count; i++) {
2146
+ /* cleanup the CRT fd */
2147
+ _close(crt_set->fd_array[i]);
2148
+ /* cleanup the duplicated SOCKET */
2149
+ closesocket(os_set->fd_array[i]);
2150
+ }
2151
+ }
2152
+ #endif
2153
+
2120
2154
  /*
2121
2155
  * call-seq:
2122
2156
  * conn.wait_for_notify( [ timeout ] ) -> String
@@ -2143,9 +2177,12 @@ pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
2143
2177
  VALUE timeout_in, relname = Qnil, be_pid = Qnil, extra = Qnil;
2144
2178
  double timeout_sec;
2145
2179
  fd_set sd_rset;
2180
+ #ifdef _WIN32
2181
+ fd_set crt_sd_rset;
2182
+ #endif
2146
2183
 
2147
2184
  if ( sd < 0 )
2148
- rb_bug("PQsocket(conn): couldn't fetch the connection's socket!");
2185
+ rb_bug( "PQsocket(conn): couldn't fetch the connection's socket!" );
2149
2186
 
2150
2187
  if ( rb_scan_args(argc, argv, "01", &timeout_in) == 1 ) {
2151
2188
  timeout_sec = NUM2DBL( timeout_in );
@@ -2159,8 +2196,18 @@ pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
2159
2196
  FD_ZERO( &sd_rset );
2160
2197
  FD_SET( sd, &sd_rset );
2161
2198
 
2199
+ #ifdef _WIN32
2200
+ create_crt_fd(&sd_rset, &crt_sd_rset);
2201
+ #endif
2202
+
2162
2203
  /* Wait for the socket to become readable before checking again */
2163
- if ( (ret = rb_thread_select(sd+1, &sd_rset, NULL, NULL, ptimeout)) < 0 )
2204
+ ret = rb_thread_select( sd+1, &sd_rset, NULL, NULL, ptimeout );
2205
+
2206
+ #ifdef _WIN32
2207
+ cleanup_crt_fd(&sd_rset, &crt_sd_rset);
2208
+ #endif
2209
+
2210
+ if ( ret < 0 )
2164
2211
  rb_sys_fail( 0 );
2165
2212
 
2166
2213
  /* Return nil if the select timed out */
@@ -2168,7 +2215,7 @@ pgconn_wait_for_notify(int argc, VALUE *argv, VALUE self)
2168
2215
 
2169
2216
  /* Read the socket */
2170
2217
  if ( (ret = PQconsumeInput(conn)) != 1 )
2171
- rb_raise(rb_ePGError, "PQconsumeInput == %d: %s", ret, PQerrorMessage(conn));
2218
+ rb_raise( rb_ePGError, "PQconsumeInput == %d: %s", ret, PQerrorMessage(conn) );
2172
2219
  }
2173
2220
 
2174
2221
  relname = rb_tainted_str_new2( notification->relname );
@@ -2607,6 +2654,9 @@ pgconn_block( int argc, VALUE *argv, VALUE self ) {
2607
2654
  VALUE timeout_in;
2608
2655
  double timeout_sec;
2609
2656
  fd_set sd_rset;
2657
+ #ifdef _WIN32
2658
+ fd_set crt_sd_rset;
2659
+ #endif
2610
2660
 
2611
2661
  /* Always set a timeout in WIN32, as rb_thread_select() sometimes
2612
2662
  * doesn't return when a second ruby thread is running although data
@@ -2630,7 +2680,16 @@ pgconn_block( int argc, VALUE *argv, VALUE self ) {
2630
2680
  while ( PQisBusy(conn) ) {
2631
2681
  FD_ZERO( &sd_rset );
2632
2682
  FD_SET( sd, &sd_rset );
2633
- ret = rb_thread_select( sd+1, &sd_rset, NULL, NULL, ptimeout );
2683
+
2684
+ #ifdef _WIN32
2685
+ create_crt_fd(&sd_rset, &crt_sd_rset);
2686
+ #endif
2687
+
2688
+ ret = rb_thread_select (sd+1, &sd_rset, NULL, NULL, ptimeout );
2689
+
2690
+ #ifdef _WIN32
2691
+ cleanup_crt_fd(&sd_rset, &crt_sd_rset);
2692
+ #endif
2634
2693
 
2635
2694
  /* Return false if there was a timeout argument and the select() timed out */
2636
2695
  if ( ret == 0 && argc )
@@ -3524,36 +3583,84 @@ pgresult_aref(VALUE self, VALUE index)
3524
3583
  VALUE fname,val;
3525
3584
  VALUE tuple;
3526
3585
 
3527
- if(tuple_num < 0 || tuple_num >= PQntuples(result))
3528
- rb_raise(rb_eIndexError, "Index %d is out of range", tuple_num);
3586
+ if ( tuple_num < 0 || tuple_num >= PQntuples(result) )
3587
+ rb_raise( rb_eIndexError, "Index %d is out of range", tuple_num );
3588
+
3529
3589
  tuple = rb_hash_new();
3530
- for(field_num = 0; field_num < PQnfields(result); field_num++) {
3531
- fname = rb_tainted_str_new2(PQfname(result,field_num));
3590
+ for ( field_num = 0; field_num < PQnfields(result); field_num++ ) {
3591
+ fname = rb_tainted_str_new2( PQfname(result,field_num) );
3532
3592
  ASSOCIATE_INDEX(fname, self);
3533
- if(PQgetisnull(result, tuple_num, field_num)) {
3534
- rb_hash_aset(tuple, fname, Qnil);
3593
+ if ( PQgetisnull(result, tuple_num, field_num) ) {
3594
+ rb_hash_aset( tuple, fname, Qnil );
3535
3595
  }
3536
3596
  else {
3537
- val = rb_tainted_str_new(PQgetvalue(result, tuple_num, field_num),
3538
- PQgetlength(result, tuple_num, field_num));
3597
+ val = rb_tainted_str_new( PQgetvalue(result, tuple_num, field_num ),
3598
+ PQgetlength(result, tuple_num, field_num) );
3539
3599
 
3540
3600
  /* associate client encoding for text format only */
3541
- if(0 == PQfformat(result, field_num)) {
3542
- fflush( stdout );
3543
- ASSOCIATE_INDEX(val, self);
3601
+ if ( 0 == PQfformat(result, field_num) ) {
3602
+ ASSOCIATE_INDEX( val, self );
3544
3603
  } else {
3545
3604
  #ifdef M17N_SUPPORTED
3546
- fflush( stdout );
3547
- rb_enc_associate(val, rb_ascii8bit_encoding());
3605
+ rb_enc_associate( val, rb_ascii8bit_encoding() );
3548
3606
  #endif
3549
3607
  }
3550
- rb_hash_aset(tuple, fname, val);
3608
+ rb_hash_aset( tuple, fname, val );
3551
3609
  }
3552
3610
  }
3553
3611
  return tuple;
3554
3612
  }
3555
3613
 
3556
3614
 
3615
+ /*
3616
+ * call-seq:
3617
+ * res.values -> Array
3618
+ *
3619
+ * Returns all tuples as an array of arrays.
3620
+ */
3621
+ static VALUE
3622
+ pgresult_values(VALUE self, VALUE index)
3623
+ {
3624
+ PGresult* result = (PGresult*) get_pgresult(self);
3625
+ int row;
3626
+ int field;
3627
+ int num_rows = PQntuples(result);
3628
+ int num_fields = PQnfields(result);
3629
+ VALUE ary = rb_ary_new2(num_rows);
3630
+
3631
+ for ( row = 0; row < num_rows; row++ ) {
3632
+ /* create new row */
3633
+ VALUE new_row = rb_ary_new2(num_fields);
3634
+
3635
+ /* add to return array */
3636
+ rb_ary_store( ary, row, new_row );
3637
+
3638
+ /* populate it */
3639
+ for ( field = 0; field < num_fields; field++ ) {
3640
+ if ( PQgetisnull(result, row, field) ) {
3641
+ rb_ary_store( new_row, field, Qnil );
3642
+ }
3643
+ else {
3644
+ VALUE val = rb_tainted_str_new( PQgetvalue(result, row, field),
3645
+ PQgetlength(result, row, field) );
3646
+
3647
+ /* associate client encoding for text format only */
3648
+ if ( 0 == PQfformat(result, field) ) {
3649
+ ASSOCIATE_INDEX( val, self );
3650
+ } else {
3651
+ #ifdef M17N_SUPPORTED
3652
+ rb_enc_associate( val, rb_ascii8bit_encoding() );
3653
+ #endif
3654
+ }
3655
+
3656
+ rb_ary_store( new_row, field, val );
3657
+ }
3658
+ }
3659
+ }
3660
+ return ary;
3661
+ }
3662
+
3663
+
3557
3664
  /*
3558
3665
  * call-seq:
3559
3666
  * res.column_values( n ) -> array
@@ -3668,6 +3775,7 @@ pgresult_fields(VALUE self)
3668
3775
  return ary;
3669
3776
  }
3670
3777
 
3778
+
3671
3779
  #ifdef M17N_SUPPORTED
3672
3780
  /**
3673
3781
  * The mapping from canonical encoding names in PostgreSQL to ones in Ruby.
@@ -4305,6 +4413,7 @@ Init_pg_ext()
4305
4413
  rb_define_method(rb_cPGresult, "[]", pgresult_aref, 1);
4306
4414
  rb_define_method(rb_cPGresult, "each", pgresult_each, 0);
4307
4415
  rb_define_method(rb_cPGresult, "fields", pgresult_fields, 0);
4416
+ rb_define_method(rb_cPGresult, "values", pgresult_values, 0);
4308
4417
  rb_define_method(rb_cPGresult, "column_values", pgresult_column_values, 1);
4309
4418
  rb_define_method(rb_cPGresult, "field_values", pgresult_field_values, 1);
4310
4419
 
@@ -121,6 +121,15 @@ describe PGresult do
121
121
  }.to raise_error( IndexError, /-1 is out of range/i )
122
122
  end
123
123
 
124
+ it "should raise allow for conversion to an array of arrays" do
125
+ @conn.exec( 'CREATE TABLE valuestest ( foo varchar(33) )' )
126
+ @conn.exec( 'INSERT INTO valuestest ("foo") values (\'bar\')' )
127
+ @conn.exec( 'INSERT INTO valuestest ("foo") values (\'bar2\')' )
128
+
129
+ res = @conn.exec( 'SELECT * FROM valuestest' )
130
+ res.values.should == [ ["bar"], ["bar2"] ]
131
+ end
132
+
124
133
  # PQfmod
125
134
  it "can return the type modifier for a result column" do
126
135
  @conn.exec( 'CREATE TABLE fmodtest ( foo varchar(33) )' )
metadata CHANGED
@@ -1,12 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 1923832225
5
+ prerelease:
5
6
  segments:
6
7
  - 0
7
- - 10
8
- - 1
9
- version: 0.10.1
8
+ - 11
9
+ - 0
10
+ - pre
11
+ - 220
12
+ version: 0.11.0pre220
10
13
  platform: ruby
11
14
  authors:
12
15
  - Jeff Davis
@@ -35,7 +38,7 @@ cert_chain:
35
38
  cmlhXe46pZNJgWKbxZah85jIjx95hR8vOI+NAM5iH9kOqK13DrxacTKPhqj5PjwF
36
39
  -----END CERTIFICATE-----
37
40
 
38
- date: 2011-01-19 00:00:00 -08:00
41
+ date: 2011-02-23 00:00:00 -08:00
39
42
  default_executable:
40
43
  dependencies: []
41
44
 
@@ -117,6 +120,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
120
  requirements:
118
121
  - - ">="
119
122
  - !ruby/object:Gem::Version
123
+ hash: 57
120
124
  segments:
121
125
  - 1
122
126
  - 8
@@ -127,13 +131,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
131
  requirements:
128
132
  - - ">="
129
133
  - !ruby/object:Gem::Version
134
+ hash: 3
130
135
  segments:
131
136
  - 0
132
137
  version: "0"
133
138
  requirements:
134
139
  - PostgreSQL >=7.4
135
140
  rubyforge_project:
136
- rubygems_version: 1.3.7
141
+ rubygems_version: 1.5.2
137
142
  signing_key:
138
143
  specification_version: 3
139
144
  summary: A Ruby interface to the PostgreSQL RDBMS
metadata.gz.sig CHANGED
Binary file