pg 1.5.2-x64-mingw-ucrt → 1.5.3-x64-mingw-ucrt

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 860e2bf9a722057b6b73f7c3cb72a33efc5dc592cf59b3317430e7bb080da281
4
- data.tar.gz: c5937c718428eeda41763485b1a526443961047149220c78001118d22c45fd54
3
+ metadata.gz: aaff4e1c157159bdf596681c668652c90890a31e1f7d2501cae2407252e5fb8b
4
+ data.tar.gz: 9d41e14b063212d6890a1675653e2a73b797e425e670b05df6cf0376c32278ad
5
5
  SHA512:
6
- metadata.gz: 260bc87a40313f4c72f57bd875c310a04610cd45f4b4a81ef4bade0d83881682f254f36ddac7a5a69d0d084c79ba5f20847d61c1b4d6565335b49336d4aee9ac
7
- data.tar.gz: 73ff82bfabe5f1ed4b7a8518fc00f5dd5e93fc4719e2af0441a6282562865b31799048e83383d10248792ed261a4622f6df1eeee487ff6e9e25b568497e53cf7
6
+ metadata.gz: 1d3b494fa4ee81e83f080fa38945b07041f23c24b3b31063313839c95d8afb13bb81d5da7f45718507405a5caf67cfeedc5d531d5fcb7a7732a911a746e1f5a6
7
+ data.tar.gz: 96f1583ffb0d510de56b5567e82abb12ca5aa61701e1252dcf0268f9dd0fe530a66db4d1ea718837f6997e4ed57cfe54ee6a5affc2b3c1f14251f2a64dea7c0d
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
- )��Ac����0���������fX}������V���>m�sIge����F���%�9pt`�n��Gg�/�1l*�U�ף�{�b�g T�������S�������=����A�#�5rt���)����gQ�#�K��/9���4�'�I|.�D��g��ٰ-����� r�E£��WO�4�!&�/b��)��O:
2
- |]���5O�>�na�B꫊�U���UEC(BzQTz���l|�5F
3
- r��:� $�D�*b���*"WZT KMP#:�V7����VS8�>�L���� L��
1
+ |��R��C����
2
+ W�q�$��Dy��*p�,w�6��@P������.����{��#��I����q�8)�e[9�M;g/$�-��0Y����"��)툤1{�ȑ�Z�B^!9���yŦU�2˄EC,eU�l����g������+��<zG���Sp��)��ԽO16FN�M5�Ծ���
3
+ D���}47n���`�U�����%/��6���7�Ŝ YU�"Ԗļ#ۗ�w'k".��}E Zu�!�.�,�(���2{�Œ��A�,�WgJ��ɈA8ݛw
data/History.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## v1.5.3 [2023-04-28] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ - Fix possible segfault when creating a new PG::Result with type map. [#530](https://github.com/ged/ruby-pg/pull/530)
4
+ - Add category to deprecation warnings of Coder.new, so that they are suppressed for most users. [#528](https://github.com/ged/ruby-pg/pull/528)
5
+
6
+
7
+ ## v1.5.2 [2023-04-26] Lars Kanis <lars@greiz-reinsdorf.de>
8
+
9
+ - Fix regression in copy_data regarding binary format when using no coder. [#527](https://github.com/ged/ruby-pg/pull/527)
10
+
11
+
1
12
  ## v1.5.1 [2023-04-24] Lars Kanis <lars@greiz-reinsdorf.de>
2
13
 
3
14
  - Don't overwrite flags of timestamp coders. [#524](https://github.com/ged/ruby-pg/pull/524)
data/ext/pg_result.c CHANGED
@@ -208,12 +208,16 @@ pg_new_result2(PGresult *result, VALUE rb_pgconn)
208
208
 
209
209
  this = (t_pg_result *)xmalloc(sizeof(*this) + sizeof(*this->fnames) * nfields);
210
210
  this->pgresult = result;
211
+ /* Initialize connection and typemap prior to any object allocations,
212
+ * to make sure valid objects are marked. */
213
+ this->connection = rb_pgconn;
214
+ this->typemap = pg_typemap_all_strings;
215
+ this->p_typemap = RTYPEDDATA_DATA( this->typemap );
211
216
  this->nfields = -1;
212
217
  this->tuple_hash = Qnil;
213
218
  this->field_map = Qnil;
214
219
  this->flags = 0;
215
220
  self = TypedData_Wrap_Struct(rb_cPGresult, &pgresult_type, this);
216
- RB_OBJ_WRITE(self, &this->connection, rb_pgconn);
217
221
 
218
222
  if( result ){
219
223
  t_pg_connection *p_conn = pg_get_connection(rb_pgconn);
@@ -227,8 +231,6 @@ pg_new_result2(PGresult *result, VALUE rb_pgconn)
227
231
  this->p_typemap = RTYPEDDATA_DATA( this->typemap );
228
232
  this->flags = p_conn->flags;
229
233
  } else {
230
- RB_OBJ_WRITE(self, &this->typemap, pg_typemap_all_strings);
231
- this->p_typemap = RTYPEDDATA_DATA( this->typemap );
232
234
  this->enc_idx = rb_locale_encindex();
233
235
  }
234
236
 
@@ -391,7 +393,7 @@ pg_result_clear(VALUE self)
391
393
  *
392
394
  */
393
395
  VALUE
394
- pg_result_freeze(VALUE self)
396
+ static pg_result_freeze(VALUE self)
395
397
  {
396
398
  t_pg_result *this = pgresult_get_this(self);
397
399
 
@@ -405,7 +407,7 @@ pg_result_freeze(VALUE self)
405
407
  *
406
408
  * Returns +true+ if the backend result memory has been freed.
407
409
  */
408
- VALUE
410
+ static VALUE
409
411
  pgresult_cleared_p( VALUE self )
410
412
  {
411
413
  t_pg_result *this = pgresult_get_this(self);
@@ -422,7 +424,7 @@ pgresult_cleared_p( VALUE self )
422
424
  * All other Result objects are automatically cleared by the GC when the object is no longer in use or manually by PG::Result#clear .
423
425
  *
424
426
  */
425
- VALUE
427
+ static VALUE
426
428
  pgresult_autoclear_p( VALUE self )
427
429
  {
428
430
  t_pg_result *this = pgresult_get_this(self);
@@ -1422,8 +1424,9 @@ pgresult_type_map_set(VALUE self, VALUE typemap)
1422
1424
  /* Check type of method param */
1423
1425
  TypedData_Get_Struct(typemap, t_typemap, &pg_typemap_type, p_typemap);
1424
1426
 
1425
- RB_OBJ_WRITE(self, &this->typemap, p_typemap->funcs.fit_to_result( typemap, self ));
1426
- this->p_typemap = RTYPEDDATA_DATA( this->typemap );
1427
+ typemap = p_typemap->funcs.fit_to_result( typemap, self );
1428
+ RB_OBJ_WRITE(self, &this->typemap, typemap);
1429
+ this->p_typemap = RTYPEDDATA_DATA( typemap );
1427
1430
 
1428
1431
  return typemap;
1429
1432
  }
@@ -287,9 +287,7 @@ pg_tmbc_init(VALUE self, VALUE conv_ary)
287
287
  t_pg_coder *p_coder;
288
288
  /* Check argument type and store the coder pointer */
289
289
  TypedData_Get_Struct(obj, t_pg_coder, &pg_coder_type, p_coder);
290
- if( p_coder ){
291
- RB_OBJ_WRITTEN(self, Qnil, p_coder->coder_obj);
292
- }
290
+ RB_OBJ_WRITTEN(self, Qnil, p_coder->coder_obj);
293
291
  this->convs[i].cconv = p_coder;
294
292
  }
295
293
  }
data/lib/3.1/pg_ext.so CHANGED
Binary file
data/lib/3.2/pg_ext.so CHANGED
Binary file
@@ -6,19 +6,19 @@ module PG
6
6
  # Convenience classes for timezone options
7
7
  class TimestampUtc < Timestamp
8
8
  def initialize(hash={}, **kwargs)
9
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
9
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
10
10
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_UTC)
11
11
  end
12
12
  end
13
13
  class TimestampUtcToLocal < Timestamp
14
14
  def initialize(hash={}, **kwargs)
15
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
15
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
16
16
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_LOCAL)
17
17
  end
18
18
  end
19
19
  class TimestampLocal < Timestamp
20
20
  def initialize(hash={}, **kwargs)
21
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
21
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
22
22
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_LOCAL | PG::Coder::TIMESTAMP_APP_LOCAL)
23
23
  end
24
24
  end
@@ -6,13 +6,13 @@ module PG
6
6
  # Convenience classes for timezone options
7
7
  class TimestampUtc < Timestamp
8
8
  def initialize(hash={}, **kwargs)
9
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
9
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
10
10
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC)
11
11
  end
12
12
  end
13
13
  class TimestampLocal < Timestamp
14
14
  def initialize(hash={}, **kwargs)
15
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
15
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
16
16
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_LOCAL)
17
17
  end
18
18
  end
data/lib/pg/coder.rb CHANGED
@@ -7,7 +7,7 @@ module PG
7
7
 
8
8
  module BinaryFormatting
9
9
  def initialize(hash={}, **kwargs)
10
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
10
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
11
11
  super(format: 1, **hash, **kwargs)
12
12
  end
13
13
  end
@@ -15,7 +15,7 @@ module PG
15
15
 
16
16
  # Create a new coder object based on the attribute Hash.
17
17
  def initialize(hash=nil, **kwargs)
18
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" if hash
18
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) if hash
19
19
 
20
20
  (hash || kwargs).each do |key, val|
21
21
  send("#{key}=", val)
@@ -6,19 +6,19 @@ module PG
6
6
  # Convenience classes for timezone options
7
7
  class TimestampUtc < Timestamp
8
8
  def initialize(hash={}, **kwargs)
9
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
9
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
10
10
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_UTC)
11
11
  end
12
12
  end
13
13
  class TimestampUtcToLocal < Timestamp
14
14
  def initialize(hash={}, **kwargs)
15
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
15
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
16
16
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_UTC | PG::Coder::TIMESTAMP_APP_LOCAL)
17
17
  end
18
18
  end
19
19
  class TimestampLocal < Timestamp
20
20
  def initialize(hash={}, **kwargs)
21
- warn "PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}" unless hash.empty?
21
+ warn("PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from #{caller.first}", category: :deprecated) unless hash.empty?
22
22
  super(**hash, **kwargs, flags: PG::Coder::TIMESTAMP_DB_LOCAL | PG::Coder::TIMESTAMP_APP_LOCAL)
23
23
  end
24
24
  end
data/lib/pg/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PG
2
2
  # Library version
3
- VERSION = '1.5.2'
3
+ VERSION = '1.5.3'
4
4
  end
data/lib/pg.rb CHANGED
@@ -115,4 +115,15 @@ module PG
115
115
  require 'pg/tuple'
116
116
  autoload :VERSION, 'pg/version'
117
117
 
118
+
119
+ # Avoid "uninitialized constant Truffle::WarningOperations" on Truffleruby up to 22.3.1
120
+ if RUBY_ENGINE=="truffleruby" && !defined?(Truffle::WarningOperations)
121
+ module TruffleFixWarn
122
+ def warn(str, category=nil)
123
+ super(str)
124
+ end
125
+ end
126
+ Warning.extend(TruffleFixWarn)
127
+ end
128
+
118
129
  end # module PG
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,5 @@
1
- V�K�{��W۾��oЋ�����ȷ�Y��]�p�J�s�FV
1
+  &���bl�JtL�ӡ�fV�ə�o�l��<�{��GOE/��v���č��#�?C>"[HFoF�>�h�KK�_�{�ÅY|�D�>u���p��-�Yiĝ7r��#;FW,�H�=|L'����j<*�}F�)�=}���}[a<������Z9�އ��ӗ���$�ܱ!�$� ȆX♩׵~�*ps���Bn
2
+ o;
3
+ FL�^F�hCS���a��G�B M�
4
+ ���EH�<a����
5
+ \�v�g�o���i����|��.]a��9�D%�*}�t-+/�Y^<�kv ��K�h���+k�'��K��0�MO�.��@�Jz$q,�~]:p�u��j���)2h��/��q��yԆ@�UTӎA��҃(F��T�a�.a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Michael Granger
@@ -34,7 +34,7 @@ cert_chain:
34
34
  Dzx/gFSOrRoCt2mXNgrmcAfr386AfaMvCh7cXqdxZwmVo7ILZCYXck0pajvubsDd
35
35
  NUIIFkVXvd1odFyK9LF1RFAtxn/iAmpx
36
36
  -----END CERTIFICATE-----
37
- date: 2023-04-26 00:00:00.000000000 Z
37
+ date: 2023-04-28 00:00:00.000000000 Z
38
38
  dependencies: []
39
39
  description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
40
40
  9.3 and later.
metadata.gz.sig CHANGED
Binary file