pg 1.3.0.rc2-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +3 -0
  3. data/.appveyor.yml +36 -0
  4. data/.gems +6 -0
  5. data/.gemtest +0 -0
  6. data/.github/workflows/binary-gems.yml +85 -0
  7. data/.github/workflows/source-gem.yml +130 -0
  8. data/.gitignore +13 -0
  9. data/.hgsigs +34 -0
  10. data/.hgtags +41 -0
  11. data/.irbrc +23 -0
  12. data/.pryrc +23 -0
  13. data/.tm_properties +21 -0
  14. data/.travis.yml +49 -0
  15. data/BSDL +22 -0
  16. data/Contributors.rdoc +46 -0
  17. data/Gemfile +14 -0
  18. data/History.rdoc +648 -0
  19. data/LICENSE +56 -0
  20. data/Manifest.txt +72 -0
  21. data/POSTGRES +23 -0
  22. data/README-OS_X.rdoc +68 -0
  23. data/README-Windows.rdoc +56 -0
  24. data/README.ja.rdoc +13 -0
  25. data/README.rdoc +214 -0
  26. data/Rakefile +106 -0
  27. data/Rakefile.cross +300 -0
  28. data/certs/ged.pem +24 -0
  29. data/ext/errorcodes.def +1040 -0
  30. data/ext/errorcodes.rb +45 -0
  31. data/ext/errorcodes.txt +496 -0
  32. data/ext/extconf.rb +165 -0
  33. data/ext/gvl_wrappers.c +21 -0
  34. data/ext/gvl_wrappers.h +264 -0
  35. data/ext/pg.c +732 -0
  36. data/ext/pg.h +385 -0
  37. data/ext/pg_binary_decoder.c +229 -0
  38. data/ext/pg_binary_encoder.c +163 -0
  39. data/ext/pg_coder.c +615 -0
  40. data/ext/pg_connection.c +4415 -0
  41. data/ext/pg_copy_coder.c +628 -0
  42. data/ext/pg_errors.c +95 -0
  43. data/ext/pg_record_coder.c +519 -0
  44. data/ext/pg_result.c +1683 -0
  45. data/ext/pg_text_decoder.c +987 -0
  46. data/ext/pg_text_encoder.c +814 -0
  47. data/ext/pg_tuple.c +575 -0
  48. data/ext/pg_type_map.c +199 -0
  49. data/ext/pg_type_map_all_strings.c +129 -0
  50. data/ext/pg_type_map_by_class.c +269 -0
  51. data/ext/pg_type_map_by_column.c +349 -0
  52. data/ext/pg_type_map_by_mri_type.c +313 -0
  53. data/ext/pg_type_map_by_oid.c +385 -0
  54. data/ext/pg_type_map_in_ruby.c +330 -0
  55. data/ext/pg_util.c +149 -0
  56. data/ext/pg_util.h +65 -0
  57. data/ext/vc/pg.sln +26 -0
  58. data/ext/vc/pg_18/pg.vcproj +216 -0
  59. data/ext/vc/pg_19/pg_19.vcproj +209 -0
  60. data/lib/3.1/pg_ext.so +0 -0
  61. data/lib/pg/basic_type_map_based_on_result.rb +47 -0
  62. data/lib/pg/basic_type_map_for_queries.rb +193 -0
  63. data/lib/pg/basic_type_map_for_results.rb +81 -0
  64. data/lib/pg/basic_type_registry.rb +296 -0
  65. data/lib/pg/binary_decoder.rb +23 -0
  66. data/lib/pg/coder.rb +104 -0
  67. data/lib/pg/connection.rb +813 -0
  68. data/lib/pg/constants.rb +12 -0
  69. data/lib/pg/exceptions.rb +12 -0
  70. data/lib/pg/result.rb +43 -0
  71. data/lib/pg/text_decoder.rb +46 -0
  72. data/lib/pg/text_encoder.rb +59 -0
  73. data/lib/pg/tuple.rb +30 -0
  74. data/lib/pg/type_map_by_column.rb +16 -0
  75. data/lib/pg/version.rb +4 -0
  76. data/lib/pg.rb +87 -0
  77. data/lib/x64-mingw-ucrt/libpq.dll +0 -0
  78. data/misc/openssl-pg-segfault.rb +31 -0
  79. data/misc/postgres/History.txt +9 -0
  80. data/misc/postgres/Manifest.txt +5 -0
  81. data/misc/postgres/README.txt +21 -0
  82. data/misc/postgres/Rakefile +21 -0
  83. data/misc/postgres/lib/postgres.rb +16 -0
  84. data/misc/ruby-pg/History.txt +9 -0
  85. data/misc/ruby-pg/Manifest.txt +5 -0
  86. data/misc/ruby-pg/README.txt +21 -0
  87. data/misc/ruby-pg/Rakefile +21 -0
  88. data/misc/ruby-pg/lib/ruby/pg.rb +16 -0
  89. data/pg.gemspec +32 -0
  90. data/sample/array_insert.rb +20 -0
  91. data/sample/async_api.rb +106 -0
  92. data/sample/async_copyto.rb +39 -0
  93. data/sample/async_mixed.rb +56 -0
  94. data/sample/check_conn.rb +21 -0
  95. data/sample/copydata.rb +71 -0
  96. data/sample/copyfrom.rb +81 -0
  97. data/sample/copyto.rb +19 -0
  98. data/sample/cursor.rb +21 -0
  99. data/sample/disk_usage_report.rb +177 -0
  100. data/sample/issue-119.rb +94 -0
  101. data/sample/losample.rb +69 -0
  102. data/sample/minimal-testcase.rb +17 -0
  103. data/sample/notify_wait.rb +72 -0
  104. data/sample/pg_statistics.rb +285 -0
  105. data/sample/replication_monitor.rb +222 -0
  106. data/sample/test_binary_values.rb +33 -0
  107. data/sample/wal_shipper.rb +434 -0
  108. data/sample/warehouse_partitions.rb +311 -0
  109. data.tar.gz.sig +0 -0
  110. metadata +188 -0
  111. metadata.gz.sig +0 -0
data/History.rdoc ADDED
@@ -0,0 +1,648 @@
1
+ == v1.3.0 [YYY-MM-DD] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Install Enhancements:
4
+ - Print some install help if libpq wasn't found. #396
5
+ This should help to pick the necessary package without googling.
6
+ - Update Windows fat binary gem to OpenSSL-1.1.1m and PostgreSQL-14.1.
7
+ - Add binary Windows gems for Ruby 3.0 and 3.1.
8
+ - Make the library path of libpq available in ruby as PG::POSTGRESQL_LIB_PATH and add it to the search paths on Windows similar to +rpath+ on Unix systems. #373
9
+ - Fall back to pkg-config if pg_config is not found. #380
10
+ - Add option to extconf.rb to disable nogvl-wrapping of libpq functions.
11
+ All methods (except PG::Connection.ping) are nonblocking now, so that GVL unlock is in theory no longer necessary.
12
+ However it can have some advantage in concurrency, so that GVL unlock is still enabled by default.
13
+ Use:
14
+ - gem inst pg -- --disable-gvl-unlock
15
+
16
+ API Enhancements:
17
+ - Add full compatibility to Fiber.scheduler introduced in Ruby-3.0. #397
18
+ - Add async_connect and async_send methods and add specific specs for Fiber.scheduler #342
19
+ - Add async_get_result and async_get_last_result
20
+ - Add async_get_copy_data
21
+ - Implement async_put_copy_data/async_put_copy_end
22
+ - Implement async_reset method using the nonblocking libpq API
23
+ - Add async_set_client_encoding which is compatible to scheduler
24
+ - Add async_cancel as a nonblocking version of conn#cancel
25
+ - Add async_encrypt_password
26
+ - Run Connection.ping in a second thread.
27
+ - Make discard_results scheduler friendly
28
+ - Do all socket waiting through the conn.socket_io object.
29
+ - Avoid PG.connect blocking while address resolution by automatically providing the +hostaddr+ parameter.
30
+ - Add support for pipeline mode of PostgreSQL-14. #401
31
+ - Allow specification of multiple hosts in PostgreSQL URI. #387
32
+ - Add new method conn.backend_key - used to implement our own cancel method.
33
+
34
+ Type cast enhancements:
35
+ - Add PG::BasicTypeMapForQueries::BinaryData for encoding of bytea columns. #348
36
+ - Reduce time to build coder maps and permit to reuse them for several type maps per PG::BasicTypeRegistry::CoderMapsBundle.new(conn) . #376
37
+ - Make BasicTypeRegistry a class and use a global default instance of it.
38
+ Now a local type registry can be instanciated and given to the type map, to avoid changing shared global states.
39
+ - Allow PG::BasicTypeMapForQueries to take a Proc as callback for undefined types.
40
+
41
+ Other Enhancements:
42
+ - Convert all PG classes implemented in C to TypedData objects. #349
43
+ - Support ObjectSpace.memsize_of(obj) on all classes implemented in C. #393
44
+ - Make all PG objects implemented in C memory moveable and therefore GC.compact friendly. #349
45
+ - Update errorcodes and error classes to PostgreSQL-14.0.
46
+ - Add PG::CONNECTION_* constants for conn.status of newer PostgreSQL versions.
47
+ - Add better support for logical replication. #339
48
+ - Change conn.socket_io to read+write mode and to a BasicSocket object instead of IO.
49
+ - Use rb_io_wait() and the conn.socket_io object if available and remove Windows specific wait functions.
50
+ Fall back to rb_wait_for_single_fd() on ruby < 3.0, which works on Windows as well.
51
+
52
+ Bugfixes:
53
+ - Release GVL while calling PQping which is a blocking method, but it didn't release GVL so far.
54
+ - Fix Connection#transaction to no longer block on interrupts, for instance when pressing Ctrl-C and cancel a running query. #390
55
+ - Avoid casting of OIDs to fix compat with Redshift database. #369
56
+ - Call conn.block before each conn.get_result call to avoid possible blocking in case of a slow network and multiple query results.
57
+ - Sporadic Errno::ENOTSOCK when using conn.socket_io on Windows #398
58
+
59
+ Deprecated:
60
+ - Add deprecation warning to PG::BasicTypeRegistry.register_type and siblings.
61
+
62
+ Removed:
63
+ - Remove support of ruby-2.2, 2.3 and 2.4. Minimum is ruby-2.5 now.
64
+ - Remove support for PostgreSQL-9.2. Minimum is PostgreSQL-9.3 now.
65
+
66
+ Repository:
67
+ - Replace Hoe by Bundler for gem packaging
68
+ - Add Github Actions CI and testing of source and binary gems.
69
+
70
+
71
+ == v1.2.3 [2020-03-18] Michael Granger <ged@FaerieMUD.org>
72
+
73
+ Bugfixes:
74
+
75
+ - Fix possible segfault at `PG::Coder#encode`, `decode` or their implicit calls through
76
+ a typemap after GC.compact. #327
77
+ - Fix possible segfault in `PG::TypeMapByClass` after GC.compact. #328
78
+
79
+
80
+ == v1.2.2 [2020-01-06] Michael Granger <ged@FaerieMUD.org>
81
+
82
+ Enhancements:
83
+
84
+ - Add a binary gem for Ruby 2.7.
85
+
86
+
87
+ == v1.2.1 [2020-01-02] Michael Granger <ged@FaerieMUD.org>
88
+
89
+ Enhancements:
90
+
91
+ - Added internal API for sequel_pg compatibility.
92
+
93
+
94
+ == v1.2.0 [2019-12-20] Michael Granger <ged@FaerieMUD.org>
95
+
96
+ Repository:
97
+ - Our primary repository has been moved to Github https://github.com/ged/ruby-pg .
98
+ Most of the issues from https://bitbucket.org/ged/ruby-pg have been migrated. #43
99
+
100
+ API enhancements:
101
+ - Add PG::Result#field_name_type= and siblings to allow symbols to be used as field names. #306
102
+ - Add new methods for error reporting:
103
+ - PG::Connection#set_error_context_visibility
104
+ - PG::Result#verbose_error_message
105
+ - PG::Result#result_verbose_error_message (alias)
106
+ - Update errorcodes and error classes to PostgreSQL-12.0.
107
+ - New constants: PG_DIAG_SEVERITY_NONLOCALIZED, PQERRORS_SQLSTATE, PQSHOW_CONTEXT_NEVER, PQSHOW_CONTEXT_ERRORS, PQSHOW_CONTEXT_ALWAYS
108
+
109
+ Type cast enhancements:
110
+ - Add PG::TextEncoder::Record and PG::TextDecoder::Record for en/decoding of Composite Types. #258, #36
111
+ - Add PG::BasicTypeRegistry.register_coder to register instances instead of classes.
112
+ This is useful to register parametrized en/decoders like PG::TextDecoder::Record .
113
+ - Add PG::BasicTypeMapForQueries#encode_array_as= to switch between various interpretations of ruby arrays.
114
+ - Add Time, Array<Time>, Array<BigDecimal> and Array<IPAddr> encoders to PG::BasicTypeMapForQueries
115
+ - Exchange sprintf based float encoder by very fast own implementation with more natural format. #301
116
+ - Define encode and decode methods only in en/decoders that implement it, so that they can be queried by respond_to? .
117
+ - Improve PG::TypeMapByColumn#inspect
118
+ - Accept Integer and Float as input to TextEncoder::Numeric . #310
119
+
120
+ Other enhancements:
121
+ - Allocate the data part and the ruby object of PG::Result in one step, so that we don't need to check for valid data.
122
+ This removes PG::Result.allocate and PG::Result.new, which were callable but without any practical use. #42
123
+ - Make use of PQresultMemorySize() of PostgreSQL-12 and fall back to our internal estimator.
124
+ - Improve performance of PG::Result#stream_each_tuple .
125
+ - Store client encoding in data part of PG::Connection and PG::Result objects, so that we no longer use ruby's internal encoding bits. #280
126
+ - Update Windows fat binary gem to OpenSSL-1.1.1d and PostgreSQL-12.1.
127
+ - Add support for TruffleRuby. It is regularly tested as part of our CI.
128
+ - Enable +frozen_string_literal+ in all pg's ruby files
129
+
130
+ Bugfixes:
131
+ - Update the license in gemspec to "BSD-2-Clause".
132
+ It was incorrectly labeled "BSD-3-Clause". #40
133
+ - Respect PG::Coder#flags in PG::Coder#to_h.
134
+ - Fix PG::Result memsize reporting after #clear.
135
+ - Release field names to GC on PG::Result#clear.
136
+ - Fix double free in PG::Result#stream_each_tuple when an exception is raised in the block.
137
+ - Fix PG::Result#stream_each_tuple to deliver typemapped values.
138
+ - Fix encoding of Array<unknown> with PG::BasicTypeMapForQueries
139
+
140
+ Deprecated:
141
+ - Add a deprecation warning to PG::Connection#socket .
142
+
143
+ Removed:
144
+ - Remove PG::Connection#guess_result_memsize= which was temporary added in pg-1.1.
145
+ - Remove PG::Result.allocate and PG::Result.new (see enhancements).
146
+ - Remove support of tainted objects. #307
147
+ - Remove support of ruby-2.0 and 2.1. Minimum is ruby-2.2 now.
148
+
149
+ Documentation:
150
+ - Update description of connection params. See PG::Connection.new
151
+ - Link many method descriptions to corresponding libpq's documentation.
152
+ - Update sync_* and async_* query method descriptions and document the aliases.
153
+ The primary documentation is now at the async_* methods which are the default since pg-1.1.
154
+ - Fix documentation of many constants
155
+
156
+
157
+ == v1.1.4 [2019-01-08] Michael Granger <ged@FaerieMUD.org>
158
+
159
+ - Fix PG::BinaryDecoder::Timestamp on 32 bit systems. # 284
160
+ - Add new error-codes of PostgreSQL-11.
161
+ - Add ruby-2.6 support for Windows fat binary gems and remove ruby-2.0 and 2.1.
162
+
163
+
164
+ == v1.1.3 [2018-09-06] Michael Granger <ged@FaerieMUD.org>
165
+
166
+ - Revert opimization that was sometimes causing EBADF in rb_wait_for_single_fd().
167
+
168
+
169
+ == v1.1.2 [2018-08-28] Michael Granger <ged@FaerieMUD.org>
170
+
171
+ - Don't generate aliases for JOHAB encoding.
172
+ This avoids linking to deprecated/private function rb_enc(db)_alias().
173
+
174
+
175
+ == v1.1.1 [2018-08-27] Michael Granger <ged@FaerieMUD.org>
176
+
177
+ - Reduce deprecation warnings to only one message per deprecation.
178
+
179
+
180
+ == v1.1.0 [2018-08-24] Michael Granger <ged@FaerieMUD.org>
181
+
182
+ Deprecated (disable warnings per PG_SKIP_DEPRECATION_WARNING=1):
183
+ - Forwarding conn.exec to conn.exec_params is deprecated.
184
+ - Forwarding conn.exec_params to conn.exec is deprecated.
185
+ - Forwarding conn.async_exec to conn.async_exec_params.
186
+ - Forwarding conn.send_query to conn.send_query_params is deprecated.
187
+ - Forwarding conn.async_exec_params to conn.async_exec is deprecated.
188
+
189
+ PG::Connection enhancements:
190
+ - Provide PG::Connection#sync_* and PG::Connection#async_* query methods for explicit calling synchronous or asynchronous libpq API.
191
+ - Make PG::Connection#exec and siblings switchable between sync and async API per PG::Connection.async_api= and change the default to async flavors.
192
+ - Add async flavors of exec_params, prepare, exec_prepared, describe_prepared and describe_portal.
193
+ They are identical to their synchronous counterpart, but make use of PostgreSQL's async API.
194
+ - Replace `rb_thread_fd_select()` by faster `rb_wait_for_single_fd()` in `conn.block` and `conn.async_exec` .
195
+ - Add PG::Connection#discard_results .
196
+ - 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.
197
+
198
+ Result retrieval enhancements:
199
+ - Add PG::Result#tuple_values to retrieve all field values of a row as array.
200
+ - Add PG::Tuple, PG::Result#tuple and PG::Result#stream_each_tuple .
201
+ PG::Tuple offers a way to lazy cast result values.
202
+ - Estimate PG::Result size allocated by libpq and notify the garbage collector about it when running on Ruby-2.4 or newer.
203
+ - Make the estimated PG::Result size available to ObjectSpace.memsize_of(result) .
204
+
205
+ Type cast enhancements:
206
+ - Replace Ruby code by a faster C implementation of the SimpleDecoder's timestamp decode functions. github #20
207
+ - Interpret years with up to 7 digists and BC dates by timestamp decoder.
208
+ - Add text timestamp decoders for UTC vs. local timezone variations.
209
+ - Add text timestamp encoders for UTC timezone.
210
+ - Add decoders for binary timestamps: PG::BinaryDecoder::Timestamp and variations.
211
+ - Add PG::Coder#flags accessor to allow modifications of de- respectively encoder behaviour.
212
+ - Add a flag to raise TypeError for invalid input values to PG::TextDecoder::Array .
213
+ - Add a text decoder for inet/cidr written in C.
214
+ - Add a numeric decoder written in C.
215
+ - Ensure input text is zero terminated for text format in PG::Coder#decode .
216
+
217
+ Source code enhancements:
218
+ - Fix headers and permission bits of various repository files.
219
+
220
+ Bugfixes:
221
+ - Properly decode array with prepended dimensions. #272
222
+ For now dimension decorations are ignored, but a correct Array is returned.
223
+ - Array-Decoder: Avoid leaking memory when an Exception is raised while parsing. Fixes #279
224
+
225
+
226
+ == v1.0.0 [2018-01-10] Michael Granger <ged@FaerieMUD.org>
227
+
228
+ Deprecated:
229
+ - Deprecate Ruby older than 2.2.
230
+ - Deprecate Connection#socket in favor of #socket_io.
231
+
232
+ Removed:
233
+ - Remove compatibility code for Ruby < 2.0 and PostgreSQL < 9.2.
234
+ - Remove partial compatibility with Rubinius.
235
+ - Remove top-level constants PGconn, PGresult, and PGError.
236
+
237
+ Enhancements:
238
+ - Update error codes to PostgreSQL-10
239
+ - Update Windows binary gems to Ruby-2.5, PostgreSQL 10.1 and
240
+ OpenSSL 1.1.0g.
241
+
242
+ Bugfixes:
243
+ - Fix URI detection for connection strings. #265 (thanks to jjoos)
244
+ - MINGW: Workaround segfault due to GCC linker error in conjunction with MSVC.
245
+ This happens when linking to PostgreSQL-10.0-x64 from EnterpriseDB.
246
+
247
+ Documentation fixes:
248
+ - Add PostgreSQL version since when the given function is supported. #263
249
+ - Better documentation to `encoder` and `decoder` arguments of COPY related methods.
250
+
251
+
252
+ == v0.21.0 [2017-06-12] Michael Granger <ged@FaerieMUD.org>
253
+
254
+ Enhancements:
255
+ - Move add_dll_directory to the Runtime namespace for newest versions
256
+ of RubyInstaller.
257
+ - Deprecate PGconn, PGresult, and PGError top-level constants; a warning
258
+ will be output the first time one of them is used. They will be
259
+ removed in the upcoming 1.0 release.
260
+
261
+ Documentation fixes:
262
+ - Update the docs for PG::Result#cmd_tuples
263
+
264
+ New Samples:
265
+ - Add an example of the nicer #copy_data way of doing `COPY`.
266
+
267
+
268
+ == v0.20.0 [2017-03-10] Michael Granger <ged@FaerieMUD.org>
269
+
270
+ Enhancements:
271
+ - Update error codes to PostgreSQL-9.6
272
+ - Update Windows binary gems to Ruby-2.4, PostgreSQL 9.6.1 and
273
+ OpenSSL 1.0.2j.
274
+ - Add support for RubyInstaller2 to Windows binary gems.
275
+
276
+ Bugfixes:
277
+ - Use secure JSON methods for JSON (de)serialisation. #248
278
+ - Fix Result#inspect on a cleared result.
279
+ - Fix test case that failed on Ruby-2.4. #255
280
+
281
+ Documentation fixes:
282
+ - Talk about Integer instead of Fixnum.
283
+ - Fix method signature of Coder#encode.
284
+
285
+
286
+ == v0.19.0 [2016-09-21] Michael Granger <ged@FaerieMUD.org>
287
+
288
+ - Deprecate Ruby 1.9
289
+
290
+ Enhancements:
291
+ - Respect and convert character encoding of all strings sent
292
+ to the server. #231
293
+ - Add PostgreSQL-9.5 functions PQsslInUse(), PQsslAttribute()
294
+ and PQsslAttributeNames().
295
+ - Various documentation fixes and improvements.
296
+ - Add mechanism to build without pg_config:
297
+ gem install pg -- --with-pg-config=ignore
298
+ - Update Windows binary gems to Ruby-2.3, PostgreSQL 9.5.4 and
299
+ OpenSSL 1.0.2f.
300
+ - Add JSON coders and add them to BasicTypeMapForResults and
301
+ BasicTypeMapBasedOnResult
302
+ - Allow build from git per bundler.
303
+
304
+ Bugfixes:
305
+ - Release GVL while calling PQsetClientEncoding(). #245
306
+ - Add __EXTENSIONS__ to Solaris/SmartOS for Ruby >= 2.3.x. #236
307
+ - Fix wrong exception when running SQL while in Connection#copy_data
308
+ block for output
309
+
310
+
311
+ == v0.18.4 [2015-11-13] Michael Granger <ged@FaerieMUD.org>
312
+
313
+ Enhancements:
314
+ - Fixing compilation problems with Microsoft Visual Studio 2008. GH #10
315
+ - Avoid name clash with xcode and jemalloc. PR#22, PR#23
316
+
317
+ Bugfixes:
318
+ - Avoid segfault, when quote_ident or TextEncoder::Identifier
319
+ is called with Array containing non-strings. #226
320
+
321
+
322
+ == v0.18.3 [2015-09-03] Michael Granger <ged@FaerieMUD.org>
323
+
324
+ Enhancements:
325
+ - Use rake-compiler-dock to build windows gems easily.
326
+ - Add CI-tests on appveyor and fix test cases accordingly.
327
+
328
+ Bugfixes:
329
+ - Fix data type resulting in wrong base64 encoding.
330
+ - Change instance_of checks to kind_of for subclassing. #220
331
+ - TextDecoder::Date returns an actual Ruby Date instead of a Time
332
+ (thanks to Thomas Ramfjord)
333
+
334
+
335
+ == v0.18.2 [2015-05-14] Michael Granger <ged@FaerieMUD.org>
336
+
337
+ Enhancements:
338
+
339
+ - Allow URI connection string (thanks to Chris Bandy)
340
+ - Allow Array type parameter to conn.quote_ident
341
+
342
+ Bugfixes:
343
+
344
+ - Speedups and fixes for PG::TextDecoder::Identifier and quoting behavior
345
+ - Revert addition of PG::Connection#hostaddr [#202].
346
+ - Fix decoding of fractional timezones and timestamps [#203]
347
+ - Fixes for non-C99 compilers
348
+ - Avoid possible symbol name clash when linking against static libpq.
349
+
350
+
351
+ == v0.18.1 [2015-01-05] Michael Granger <ged@FaerieMUD.org>
352
+
353
+ Correct the minimum compatible Ruby version to 1.9.3. #199
354
+
355
+
356
+ == v0.18.0 [2015-01-01] Michael Granger <ged@FaerieMUD.org>
357
+
358
+ Bugfixes:
359
+ - Fix OID to Integer mapping (it is unsigned now). #187
360
+ - Fix possible segfault in conjunction with notice receiver. #185
361
+
362
+ Enhancements:
363
+
364
+ - Add an extensible type cast system.
365
+ - A lot of performance improvements.
366
+ - Return frozen String objects for result field names.
367
+ - Add PG::Result#stream_each and #stream_each_row as fast helpers for
368
+ the single row mode.
369
+ - Add Enumerator variant to PG::Result#each and #each_row.
370
+ - Add PG::Connection#conninfo and #hostaddr.
371
+ - Add PG.init_openssl and PG.init_ssl methods.
372
+ - Add PG::Result.inspect
373
+ - Force zero termination for all text strings that are given to libpq.
374
+ It raises an ArgumentError if the string contains a null byte.
375
+ - Update Windows cross build to PostgreSQL 9.3.
376
+
377
+
378
+
379
+ == v0.17.1 [2013-12-18] Michael Granger <ged@FaerieMUD.org>
380
+
381
+ Bugfixes:
382
+
383
+ - Fix compatibility with signal handlers defined in Ruby. This reverts
384
+ cancellation of queries running on top of the blocking libpq API (like
385
+ Connection#exec) in case of signals. As an alternative the #async_exec
386
+ can be used, which is reverted to use the non-blocking API, again.
387
+ - Wrap PQcancel to be called without GVL. It internally waits for
388
+ the canceling connection.
389
+
390
+ Documentation fixes:
391
+
392
+ - Fix documentation for PG::Connection::conndefaults.
393
+
394
+
395
+ == v0.17.0 [2013-09-15] Michael Granger <ged@FaerieMUD.org>
396
+
397
+ Bugfixes:
398
+
399
+ - Fix crash by calling PQsend* and PQisBusy without GVL (#171).
400
+
401
+ Enhancements:
402
+
403
+ - Add method PG::Connection#copy_data.
404
+ - Add a Gemfile to allow installation of dependencies with bundler.
405
+ - Add compatibility with rake-compiler-dev-box.
406
+ - Return self from PG::Result#check instead of nil. This allows
407
+ to stack method calls.
408
+
409
+
410
+ == v0.16.0 [2013-07-22] Michael Granger <ged@FaerieMUD.org>
411
+
412
+ Bugfixes:
413
+
414
+ - Avoid warnings about uninitialized instance variables.
415
+ - Use a more standard method of adding library and include directories.
416
+ This fixes build on AIX (Github #7) and Solaris (#164).
417
+ - Cancel the running query, if a thread is about to be killed (e.g. by CTRL-C).
418
+ - Fix GVL issue with wait_for_notify/notifies and notice callbacks.
419
+ - Set proper encoding on the string returned by quote_ident, escape_literal
420
+ and escape_identifier (#163).
421
+ - Use nil as PG::Error#result in case of a NULL-result from libpq (#166).
422
+ - Recalculate the timeout of conn#wait_for_notify and conn#block in case
423
+ of socket events that require re-runs of select().
424
+
425
+ Documentation fixes:
426
+
427
+ - Fix non working example for PGresult#error_field.
428
+
429
+ Enhancements:
430
+
431
+ - Add unique exception classes for each PostgreSQL error type (#5).
432
+ - Return result of the block in conn#transaction instead of nil (#158).
433
+ - Allow 'rake compile' and 'rake gem' on non mercurial repos.
434
+ - Add support for PG_DIAG_*_NAME error fields of PostgreSQL-9.3 (#161).
435
+
436
+
437
+ == v0.15.1 [2013-04-08] Michael Granger <ged@FaerieMUD.org>
438
+
439
+ Bugfixes:
440
+
441
+ - Shorten application_name to avoid warnings about truncated identifier.
442
+
443
+
444
+ == v0.15.0 [2013-03-03] Michael Granger <ged@FaerieMUD.org>
445
+
446
+ Bugfixes:
447
+
448
+ - Fix segfault in PG::Result#field_values when called with non String value.
449
+ - Fix encoding of messages delivered by notice callbacks.
450
+ - Fix text encoding for Connection#wait_for_notify and Connection#notifies.
451
+ - Fix 'Bad file descriptor' problems under Windows: wrong behaviour of
452
+ #wait_for_notify() and timeout handling of #block on Ruby 1.9.
453
+
454
+ Documentation fixes:
455
+
456
+ - conn#socket() can not be used with IO.for_fd() on Windows.
457
+
458
+ Enhancements:
459
+
460
+ - Tested under Ruby 2.0.0p0.
461
+ - Add single row mode of PostgreSQL 9.2.
462
+ - Set fallback_application_name to program name $0. Thanks to Will Leinweber
463
+ for the patch.
464
+ - Release Ruby's GVL while calls to blocking libpq functions to allow better
465
+ concurrency in threaded applications.
466
+ - Refactor different variants of waiting for the connection socket.
467
+ - Make use of rb_thread_fd_select() on Ruby 1.9 and avoid deprecated
468
+ rb_thread_select().
469
+ - Add an example of how to insert array data using a prepared statement (#145).
470
+ - Add continuous integration tests on travis-ci.org.
471
+ - Add PG::Result#each_row for iterative over result sets by row. Thanks to
472
+ Aaron Patterson for the patch.
473
+ - Add a PG::Connection#socket_io method for fetching a (non-autoclosing) IO
474
+ object for the connection's socket.
475
+
476
+ Specs:
477
+
478
+ - Fix various specs to run on older PostgreSQL and Ruby versions.
479
+ - Avoid fork() in specs to allow usage on Windows and JRuby.
480
+
481
+
482
+ == v0.14.1 [2012-09-02] Michael Granger <ged@FaerieMUD.org>
483
+
484
+ Important bugfix:
485
+
486
+ - Fix stack overflow bug in PG::Result#values and #column_values (#135). Thanks
487
+ to everyone who reported the bug, and Lars Kanis especially for figuring out
488
+ the problem.
489
+
490
+ PostgreSQL 9.2 beta fixes:
491
+
492
+ - Recognize PGRES_SINGLE_TUPLE as OK when checking PGresult (Jeremy Evans)
493
+
494
+ Documentation fixes:
495
+
496
+ - Add note about the usage scope of the result object received by the
497
+ #set_notice_receiver block. (Lars Kanis)
498
+ - Add PGRES_COPY_BOTH to documentation of PG::Result#result_status. (Lars Kanis)
499
+ - Add some documentation to PG::Result#fnumber (fix for #139)
500
+
501
+
502
+ == v0.14.0 [2012-06-17] Michael Granger <ged@FaerieMUD.org>
503
+
504
+ Bugfixes:
505
+ #47, #104
506
+
507
+
508
+ New Methods for PostgreSQL 9 and async API support:
509
+ PG
510
+ - ::library_version
511
+
512
+ PG::Connection
513
+ - ::ping
514
+ - #escape_literal
515
+ - #escape_identifier
516
+ - #set_default_encoding
517
+
518
+ PG::Result
519
+ - #check
520
+
521
+
522
+ New Samples:
523
+
524
+ This release also comes with a collection of contributed sample scripts for
525
+ doing resource-utilization reports, graphing database statistics,
526
+ monitoring for replication lag, shipping WAL files for replication,
527
+ automated tablespace partitioning, etc. See the samples/ directory.
528
+
529
+
530
+ == v0.13.2 [2012-02-22] Michael Granger <ged@FaerieMUD.org>
531
+
532
+ - Make builds against PostgreSQL earlier than 8.3 fail with a descriptive
533
+ message instead of a compile failure.
534
+
535
+
536
+ == v0.13.1 [2012-02-12] Michael Granger <ged@FaerieMUD.org>
537
+
538
+ - Made use of a finished PG::Connection raise a PG::Error instead of
539
+ a fatal error (#110).
540
+ - Added missing BSDL license file (#108)
541
+
542
+
543
+ == v0.13.0 [2012-02-09] Michael Granger <ged@FaerieMUD.org>
544
+
545
+ Reorganization of modules/classes to be better Ruby citizens (with backward-compatible aliases):
546
+ - Created toplevel namespace 'PG' to correspond with the gem name.
547
+ - Renamed PGconn to PG::Connection (with ::PGconn alias)
548
+ - Renamed PGresult to PG::Result (with ::PGresult alias)
549
+ - Renamed PGError to PG::Error (with ::PGError alias)
550
+ - Declare all constants inside PG::Constants, then include them in
551
+ PG::Connection and PG::Result for backward-compatibility, and
552
+ in PG for convenience.
553
+ - Split the extension source up by class/module.
554
+ - Removed old compatibility code for PostgreSQL versions < 8.3
555
+
556
+ Documentation:
557
+ - Clarified licensing, updated to Ruby 1.9's license.
558
+ - Merged authors list, added some missing people to the Contributor's
559
+ list.
560
+ - Cleaned up the sample/ directory
561
+ - Making contact info a bit clearer, link to the Google+ page and
562
+ the mailing list
563
+
564
+ Enhancements:
565
+ - Added a convenience method: PG.connect -> PG::Connection.new
566
+
567
+ Bugfixes:
568
+ - Fixed LATIN5-LATIN10 Postgres<->Ruby encoding conversions
569
+
570
+
571
+
572
+ == v0.12.2 [2012-01-03] Michael Granger <ged@FaerieMUD.org>
573
+
574
+ - Fix for the 1.8.7 breakage introduced by the st.h fix for alternative Ruby
575
+ implementations (#97 and #98). Thanks to Lars Kanis for the patch.
576
+ - Encode error messages with the connection's encoding under 1.9 (#96)
577
+
578
+
579
+ == v0.12.1 [2011-12-14] Michael Granger <ged@FaerieMUD.org>
580
+
581
+ - Made rake-compiler a dev dependency, as Rubygems doesn't use the Rakefile
582
+ for compiling the extension. Thanks to eolamey@bitbucket and Jeremy Evans
583
+ for pointing this out.
584
+ - Added an explicit include for ruby/st.h for implementations that need it
585
+ (fixes #95).
586
+
587
+
588
+ == v0.12.0 [2011-12-07] Michael Granger <ged@FaerieMUD.org>
589
+
590
+ - PGconn#wait_for_notify
591
+ * send nil as the payload argument if the NOTIFY didn't have one.
592
+ * accept a nil argument for no timeout (Sequel support)
593
+ * Fixed API docs
594
+ * Taint and encode event name and payload
595
+ - Handle errors while rb_thread_select()ing in PGconn#block.
596
+ (Brian Weaver).
597
+ - Fixes for Win32 async queries (Rafał Bigaj)
598
+ - Memory leak fixed: Closing opened WSA event. (rafal)
599
+ - Fixes for #66 Win32 asynchronous queries hang on connection
600
+ error. (rafal)
601
+ - Fixed a typo in PGconn#error_message's documentation
602
+ - fixing unused variable warnings for ruby 1.9.3 (Aaron Patterson)
603
+ - Build system bugfixes
604
+ - Converted to Hoe
605
+ - Updates for the Win32 binary gem builds (Lars Kanis)
606
+
607
+
608
+ == v0.11.0 [2011-02-09] Michael Granger <ged@FaerieMUD.org>
609
+
610
+ Enhancements:
611
+
612
+ * Added a PGresult#values method to fetch all result rows as an Array of
613
+ Arrays. Thanks to Jason Yanowitz (JYanowitz at enovafinancial dot com) for
614
+ the patch.
615
+
616
+
617
+ == v0.10.1 [2011-01-19] Michael Granger <ged@FaerieMUD.org>
618
+
619
+ Bugfixes:
620
+
621
+ * Add an include guard for pg.h
622
+ * Simplify the common case require of the ext
623
+ * Include the extconf header
624
+ * Fix compatibility with versions of PostgreSQL without PQgetCancel. (fixes #36)
625
+ * Fix require for natively-compiled extension under Windows. (fixes #55)
626
+ * Change rb_yield_splat() to rb_yield_values() for compatibility with Rubinius. (fixes #54)
627
+
628
+
629
+ == v0.10.0 [2010-12-01] Michael Granger <ged@FaerieMUD.org>
630
+
631
+ Enhancements:
632
+
633
+ * Added support for the payload of NOTIFY events (w/Mahlon E. Smith)
634
+ * Updated the build system with Rubygems suggestions from RubyConf 2010
635
+
636
+ Bugfixes:
637
+
638
+ * Fixed issue with PGconn#wait_for_notify that caused it to miss notifications that happened after
639
+ the LISTEN but before the wait_for_notify.
640
+
641
+ == v0.9.0 [2010-02-28] Michael Granger <ged@FaerieMUD.org>
642
+
643
+ Bugfixes.
644
+
645
+ == v0.8.0 [2009-03-28] Jeff Davis <davis.jeffrey@gmail.com>
646
+
647
+ Bugfixes, better Windows support.
648
+
data/LICENSE ADDED
@@ -0,0 +1,56 @@
1
+ Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
+ You can redistribute it and/or modify it under either the terms of the
3
+ 2-clause BSDL (see the file BSDL), or the conditions below:
4
+
5
+ 1. You may make and give away verbatim copies of the source form of the
6
+ software without restriction, provided that you duplicate all of the
7
+ original copyright notices and associated disclaimers.
8
+
9
+ 2. You may modify your copy of the software in any way, provided that
10
+ you do at least ONE of the following:
11
+
12
+ a) place your modifications in the Public Domain or otherwise
13
+ make them Freely Available, such as by posting said
14
+ modifications to Usenet or an equivalent medium, or by allowing
15
+ the author to include your modifications in the software.
16
+
17
+ b) use the modified software only within your corporation or
18
+ organization.
19
+
20
+ c) give non-standard binaries non-standard names, with
21
+ instructions on where to get the original software distribution.
22
+
23
+ d) make other distribution arrangements with the author.
24
+
25
+ 3. You may distribute the software in object code or binary form,
26
+ provided that you do at least ONE of the following:
27
+
28
+ a) distribute the binaries and library files of the software,
29
+ together with instructions (in the manual page or equivalent)
30
+ on where to get the original distribution.
31
+
32
+ b) accompany the distribution with the machine-readable source of
33
+ the software.
34
+
35
+ c) give non-standard binaries non-standard names, with
36
+ instructions on where to get the original software distribution.
37
+
38
+ d) make other distribution arrangements with the author.
39
+
40
+ 4. You may modify and include the part of the software into any other
41
+ software (possibly commercial). But some files in the distribution
42
+ are not written by the author, so that they are not under these terms.
43
+
44
+ For the list of those files and their copying conditions, see the
45
+ file LEGAL.
46
+
47
+ 5. The scripts and library files supplied as input to or produced as
48
+ output from the software do not automatically fall under the
49
+ copyright of the software, but belong to whomever generated them,
50
+ and may be sold commercially, and may be aggregated with this
51
+ software.
52
+
53
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
54
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
55
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
56
+ PURPOSE.