File: History.rdoc

package info (click to toggle)
ruby-pg 1.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,200 kB
  • sloc: ansic: 7,296; ruby: 6,545; makefile: 14
file content (485 lines) | stat: -rw-r--r-- 16,963 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
== v1.1.3 [2018-09-06] Michael Granger <ged@FaerieMUD.org>

- Revert opimization that was sometimes causing EBADF in rb_wait_for_single_fd().


== v1.1.2 [2018-08-28] Michael Granger <ged@FaerieMUD.org>

- Don't generate aliases for JOHAB encoding.
  This avoids linking to deprecated/private function rb_enc(db)_alias().


== v1.1.1 [2018-08-27] Michael Granger <ged@FaerieMUD.org>

- Reduce deprecation warnings to only one message per deprecation.


== v1.1.0 [2018-08-24] Michael Granger <ged@FaerieMUD.org>

Deprecated (disable warnings per PG_SKIP_DEPRECATION_WARNING=1):
- Forwarding conn.exec to conn.exec_params is deprecated.
- Forwarding conn.exec_params to conn.exec is deprecated.
- Forwarding conn.async_exec to conn.async_exec_params.
- Forwarding conn.send_query to conn.send_query_params is deprecated.
- Forwarding conn.async_exec_params to conn.async_exec is deprecated.

PG::Connection enhancements:
- Provide PG::Connection#sync_* and PG::Connection#async_* query methods for explicit calling syncronous or asynchronous libpq API.
- Make PG::Connection#exec and siblings switchable between sync and async API per PG::Connection.async_api= and change the default to async flavors.
- Add async flavors of exec_params, prepare, exec_prepared, describe_prepared and describe_portal.
  They are identical to their syncronous counterpart, but make use of PostgreSQL's async API.
- Replace `rb_thread_fd_select()` by faster `rb_wait_for_single_fd()` in `conn.block` and `conn.async_exec` .
- Add PG::Connection#discard_results .
- Raise an ArgumentError for strings containing zero bytes by #escape, #escape_literal, #escape_identifier, #quote_ident and PG::TextEncoder::Identifier. These methods previously truncated strings.

Result retrieval enhancements:
- Add PG::Result#tuple_values to retrieve all field values of a row as array.
- Add PG::Tuple, PG::Result#tuple and PG::Result#stream_each_tuple .
  PG::Tuple offers a way to lazy cast result values.
- Estimate PG::Result size allocated by libpq and notify the garbage collector about it when running on Ruby-2.4 or newer.
- Make the estimated PG::Result size available to ObjectSpace.memsize_of(result) .

Type cast enhancements:
- Replace Ruby code by a faster C implementation of the SimpleDecoder's timestamp decode functions. github #20
- Interpret years with up to 7 digists and BC dates by timestamp decoder.
- Add text timestamp decoders for UTC vs. local timezone variations.
- Add text timestamp encoders for UTC timezone.
- Add decoders for binary timestamps: PG::BinaryDecoder::Timestamp and variations.
- Add PG::Coder#flags accessor to allow modifications of de- respectively encoder behaviour.
- Add a flag to raise TypeError for invalid input values to PG::TextDecoder::Array .
- Add a text decoder for inet/cidr written in C.
- Add a numeric decoder written in C.
- Ensure input text is zero terminated for text format in PG::Coder#decode .

Source code enhancements:
- Fix headers and permission bits of various repository files.

Bugfixes:
- Properly decode array with prepended dimensions. #272
  For now dimension decorations are ignored, but a correct Array is returned.
- Array-Decoder: Avoid leaking memory when an Exception is raised while parsing. Fixes #279


== v1.0.0 [2018-01-10] Michael Granger <ged@FaerieMUD.org>

Deprecated:
- Deprecate Ruby older than 2.2.
- Deprecate Connection#socket in favor of #socket_io.

Removed:
- Remove compatibility code for Ruby < 2.0 and PostgreSQL < 9.2.
- Remove partial compatibility with Rubinius.
- Remove top-level constants PGconn, PGresult, and PGError.

Enhancements:
- Update error codes to PostgreSQL-10
- Update Windows binary gems to Ruby-2.5, PostgreSQL 10.1 and
  OpenSSL 1.1.0g.

Bugfixes:
- Fix URI detection for connection strings. #265 (thanks to jjoos)
- MINGW: Workaround segfault due to GCC linker error in conjunction with MSVC.
  This happens when linking to PostgreSQL-10.0-x64 from EnterpriseDB.

Documentation fixes:
- Add PostgreSQL version since when the given function is supported. #263
- Better documentation to `encoder` and `decoder` arguments of COPY related methods.


== v0.21.0 [2017-06-12] Michael Granger <ged@FaerieMUD.org>

Enhancements:
- Move add_dll_directory to the Runtime namespace for newest versions
  of RubyInstaller.
- Deprecate PGconn, PGresult, and PGError top-level constants; a warning
  will be output the first time one of them is used. They will be
  removed in the upcoming 1.0 release.

Documentation fixes:
- Update the docs for PG::Result#cmd_tuples

New Samples:
- Add an example of the nicer #copy_data way of doing `COPY`.


== v0.20.0 [2017-03-10] Michael Granger <ged@FaerieMUD.org>

Enhancements:
- Update error codes to PostgreSQL-9.6
- Update Windows binary gems to Ruby-2.4, PostgreSQL 9.6.1 and
  OpenSSL 1.0.2j.
- Add support for RubyInstaller2 to Windows binary gems.

Bugfixes:
- Use secure JSON methods for JSON (de)serialisation. #248
- Fix Result#inspect on a cleared result.
- Fix test case that failed on Ruby-2.4. #255

Documentation fixes:
- Talk about Integer instead of Fixnum.
- Fix method signature of Coder#encode.


== v0.19.0 [2016-09-21] Michael Granger <ged@FaerieMUD.org>

- Deprecate Ruby 1.9

Enhancements:
- Respect and convert character encoding of all strings sent
  to the server. #231
- Add PostgreSQL-9.5 functions PQsslInUse(), PQsslAttribute()
  and PQsslAttributeNames().
- Various documentation fixes and improvements.
- Add mechanism to build without pg_config:
    gem install pg -- --with-pg-config=ignore
- Update Windows binary gems to Ruby-2.3, PostgreSQL 9.5.4 and
  OpenSSL 1.0.2f.
- Add JSON coders and add them to BasicTypeMapForResults and
  BasicTypeMapBasedOnResult
- Allow build from git per bundler.

Bugfixes:
- Release GVL while calling PQsetClientEncoding(). #245
- Add __EXTENSIONS__ to Solaris/SmartOS for Ruby >= 2.3.x. #236
- Fix wrong exception when running SQL while in Connection#copy_data
  block for output


== v0.18.4 [2015-11-13] Michael Granger <ged@FaerieMUD.org>

Enhancements:
- Fixing compilation problems with Microsoft Visual Studio 2008. GH #10
- Avoid name clash with xcode and jemalloc. PR#22, PR#23

Bugfixes:
- Avoid segfault, when quote_ident or TextEncoder::Identifier
  is called with Array containing non-strings. #226


== v0.18.3 [2015-09-03] Michael Granger <ged@FaerieMUD.org>

Enhancements:
- Use rake-compiler-dock to build windows gems easily.
- Add CI-tests on appveyor and fix test cases accordingly.

Bugfixes:
- Fix data type resulting in wrong base64 encoding.
- Change instance_of checks to kind_of for subclassing. #220
- TextDecoder::Date returns an actual Ruby Date instead of a Time
  (thanks to Thomas Ramfjord)


== v0.18.2 [2015-05-14] Michael Granger <ged@FaerieMUD.org>

Enhancements:

- Allow URI connection string (thanks to Chris Bandy)
- Allow Array type parameter to conn.quote_ident

Bugfixes:

- Speedups and fixes for PG::TextDecoder::Identifier and quoting behavior
- Revert addition of PG::Connection#hostaddr [#202].
- Fix decoding of fractional timezones and timestamps [#203]
- Fixes for non-C99 compilers
- Avoid possible symbol name clash when linking againt static libpq.


== v0.18.1 [2015-01-05] Michael Granger <ged@FaerieMUD.org>

Correct the minimum compatible Ruby version to 1.9.3. #199


== v0.18.0 [2015-01-01] Michael Granger <ged@FaerieMUD.org>

Bugfixes:
- Fix OID to Integer mapping (it is unsigned now). #187
- Fix possible segfault in conjunction with notice receiver. #185

Enhancements:

- Add an extensible type cast system.
- A lot of performance improvements.
- Return frozen String objects for result field names.
- Add PG::Result#stream_each and #stream_each_row as fast helpers for
  the single row mode.
- Add Enumerator variant to PG::Result#each and #each_row.
- Add PG::Connection#conninfo and #hostaddr.
- Add PG.init_openssl and PG.init_ssl methods.
- Add PG::Result.inspect
- Force zero termination for all text strings that are given to libpq.
  It raises an ArgumentError if the string contains a null byte.
- Update Windows cross build to PostgreSQL 9.3.



== v0.17.1 [2013-12-18] Michael Granger <ged@FaerieMUD.org>

Bugfixes:

- Fix compatibility with signal handlers defined in Ruby. This reverts
  cancelation of queries running on top of the blocking libpq API (like
  Connection#exec) in case of signals. As an alternative the #async_exec
  can be used, which is reverted to use the non-blocking API, again.
- Wrap PQcancel to be called without GVL. It internally waits for
  the canceling connection.

Documentation fixes:

- Fix documentation for PG::Connection::conndefaults.


== v0.17.0 [2013-09-15] Michael Granger <ged@FaerieMUD.org>

Bugfixes:

- Fix crash by calling PQsend* and PQisBusy without GVL (#171).

Enhancements:

- Add method PG::Connection#copy_data.
- Add a Gemfile to allow installation of dependencies with bundler.
- Add compatibility with rake-compiler-dev-box.
- Return self from PG::Result#check instead of nil. This allows
  to stack method calls.


== v0.16.0 [2013-07-22] Michael Granger <ged@FaerieMUD.org>

Bugfixes:

- Avoid warnings about uninitialized instance variables.
- Use a more standard method of adding library and include directories.
  This fixes build on AIX (Github #7) and Solaris (#164).
- Cancel the running query, if a thread is about to be killed (e.g. by CTRL-C).
- Fix GVL issue with wait_for_notify/notifies and notice callbacks.
- Set proper encoding on the string returned by quote_ident, escape_literal
  and escape_identifier (#163).
- Use nil as PG::Error#result in case of a NULL-result from libpq (#166).
- Recalculate the timeout of conn#wait_for_notify and conn#block in case
  of socket events that require re-runs of select().

Documentation fixes:

- Fix non working example for PGresult#error_field.

Enhancements:

- Add unique exception classes for each PostgreSQL error type (#5).
- Return result of the block in conn#transaction instead of nil (#158).
- Allow 'rake compile' and 'rake gem' on non mercurial repos.
- Add support for PG_DIAG_*_NAME error fields of PostgreSQL-9.3 (#161).


== v0.15.1 [2013-04-08] Michael Granger <ged@FaerieMUD.org>

Bugfixes:

- Shorten application_name to avoid warnings about truncated identifier.


== v0.15.0 [2013-03-03] Michael Granger <ged@FaerieMUD.org>

Bugfixes:

- Fix segfault in PG::Result#field_values when called with non String value.
- Fix encoding of messages delivered by notice callbacks.
- Fix text encoding for Connection#wait_for_notify and Connection#notifies.
- Fix 'Bad file descriptor' problems under Windows: wrong behaviour of
  #wait_for_notify() and timeout handling of #block on Ruby 1.9.

Documentation fixes:

- conn#socket() can not be used with IO.for_fd() on Windows.

Enhancements:

- Tested under Ruby 2.0.0p0.
- Add single row mode of PostgreSQL 9.2.
- Set fallback_application_name to programm name $0. Thanks to Will Leinweber
  for the patch.
- Release Ruby's GVL while calls to blocking libpq functions to allow better
  concurrency in threaded applications.
- Refactor different variants of waiting for the connection socket.
- Make use of rb_thread_fd_select() on Ruby 1.9 and avoid deprecated
  rb_thread_select().
- Add an example of how to insert array data using a prepared statement (#145).
- Add continous integration tests on travis-ci.org.
- Add PG::Result#each_row for iterative over result sets by row. Thanks to
  Aaron Patterson for the patch.
- Add a PG::Connection#socket_io method for fetching a (non-autoclosing) IO
  object for the connection's socket.

Specs:

- Fix various specs to run on older PostgreSQL and Ruby versions.
- Avoid fork() in specs to allow usage on Windows and JRuby.


== v0.14.1 [2012-09-02] Michael Granger <ged@FaerieMUD.org>

Important bugfix:

- Fix stack overflow bug in PG::Result#values and #column_values (#135). Thanks
  to everyone who reported the bug, and Lars Kanis especially for figuring out
  the problem.

PostgreSQL 9.2 beta fixes:

- Recognize PGRES_SINGLE_TUPLE as OK when checking PGresult (Jeremy Evans)

Documentation fixes:

- Add note about the usage scope of the result object received by the
  #set_notice_receiver block. (Lars Kanis)
- Add PGRES_COPY_BOTH to documentation of PG::Result#result_status. (Lars Kanis)
- Add some documentation to PG::Result#fnumber (fix for #139)


== v0.14.0 [2012-06-17] Michael Granger <ged@FaerieMUD.org>

Bugfixes:
  #47, #104


New Methods for PostgreSQL 9 and async API support:
PG
- ::library_version

PG::Connection
- ::ping
- #escape_literal
- #escape_identifier
- #set_default_encoding

PG::Result
- #check


New Samples:

This release also comes with a collection of contributed sample scripts for
doing resource-utilization reports, graphing database statistics,
monitoring for replication lag, shipping WAL files for replication,
automated tablespace partitioning, etc. See the samples/ directory.


== v0.13.2 [2012-02-22] Michael Granger <ged@FaerieMUD.org>

- Make builds against PostgreSQL earlier than 8.3 fail with a descriptive
  message instead of a compile failure.


== v0.13.1 [2012-02-12] Michael Granger <ged@FaerieMUD.org>

- Made use of a finished PG::Connection raise a PG::Error instead of
  a fatal error (#110).
- Added missing BSDL license file (#108)


== v0.13.0 [2012-02-09] Michael Granger <ged@FaerieMUD.org>

Reorganization of modules/classes to be better Ruby citizens (with backward-compatible aliases):
- Created toplevel namespace 'PG' to correspond with the gem name.
- Renamed PGconn to PG::Connection (with ::PGconn alias)
- Renamed PGresult to PG::Result (with ::PGresult alias)
- Renamed PGError to PG::Error (with ::PGError alias)
- Declare all constants inside PG::Constants, then include them in
  PG::Connection and PG::Result for backward-compatibility, and
  in PG for convenience.
- Split the extension source up by class/module.
- Removed old compatibility code for PostgreSQL versions < 8.3

Documentation:
- Clarified licensing, updated to Ruby 1.9's license.
- Merged authors list, added some missing people to the Contributor's
  list.
- Cleaned up the sample/ directory
- Making contact info a bit clearer, link to the Google+ page and
  the mailing list

Enhancements:
- Added a convenience method: PG.connect -> PG::Connection.new

Bugfixes:
- Fixed LATIN5-LATIN10 Postgres<->Ruby encoding conversions



== v0.12.2 [2012-01-03] Michael Granger <ged@FaerieMUD.org>

- Fix for the 1.8.7 breakage introduced by the st.h fix for alternative Ruby
  implementations (#97 and #98). Thanks to Lars Kanis for the patch.
- Encode error messages with the connection's encoding under 1.9 (#96)


== v0.12.1 [2011-12-14] Michael Granger <ged@FaerieMUD.org>

- Made rake-compiler a dev dependency, as Rubygems doesn't use the Rakefile
  for compiling the extension. Thanks to eolamey@bitbucket and Jeremy Evans
  for pointing this out.
- Added an explicit include for ruby/st.h for implementations that need it
  (fixes #95).


== v0.12.0 [2011-12-07] Michael Granger <ged@FaerieMUD.org>

- PGconn#wait_for_notify
  * send nil as the payload argument if the NOTIFY didn't have one.
  * accept a nil argument for no timeout (Sequel support)
  * Fixed API docs
  * Taint and encode event name and payload
- Handle errors while rb_thread_select()ing in PGconn#block.
  (Brian Weaver).
- Fixes for Win32 async queries (RafaƂ Bigaj)
- Memory leak fixed: Closing opened WSA event. (rafal)
- Fixes for #66 Win32 asynchronous queries hang on connection
  error. (rafal)
- Fixed a typo in PGconn#error_message's documentation
- fixing unused variable warnings for ruby 1.9.3 (Aaron Patterson)
- Build system bugfixes
- Converted to Hoe
- Updates for the Win32 binary gem builds (Lars Kanis)


== v0.11.0 [2011-02-09] Michael Granger <ged@FaerieMUD.org>

Enhancements:

* Added a PGresult#values method to fetch all result rows as an Array of
  Arrays. Thanks to Jason Yanowitz (JYanowitz at enovafinancial dot com) for
  the patch.


== v0.10.1 [2011-01-19] Michael Granger <ged@FaerieMUD.org>

Bugfixes:

* Add an include guard for pg.h
* Simplify the common case require of the ext
* Include the extconf header
* Fix compatibility with versions of PostgreSQL without PQgetCancel. (fixes #36)
* Fix require for natively-compiled extension under Windows. (fixes #55)
* Change rb_yield_splat() to rb_yield_values() for compatibility with Rubinius. (fixes #54)


== v0.10.0 [2010-12-01] Michael Granger <ged@FaerieMUD.org>

Enhancements:

* Added support for the payload of NOTIFY events (w/Mahlon E. Smith)
* Updated the build system with Rubygems suggestions from RubyConf 2010

Bugfixes:

* Fixed issue with PGconn#wait_for_notify that caused it to miss notifications that happened after
  the LISTEN but before the wait_for_notify.

== v0.9.0 [2010-02-28] Michael Granger <ged@FaerieMUD.org>

Bugfixes.

== v0.8.0 [2009-03-28] Jeff Davis <davis.jeffrey@gmail.com>

Bugfixes, better Windows support.