sequel_pg 1.16.0 → 1.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7bcc241985851b36df5d4e199e1edc08626fa8dcd23065aefd13b4cafd135a9
4
- data.tar.gz: 8816059db9824f1396cb9d734c1b12f1c4ccb38c13ebc4a9c953a78cfff90fdd
3
+ metadata.gz: 56786474673577561d1a782036554d0b76e235e532ef9b59a0ef2d5432b02bbf
4
+ data.tar.gz: 9c5f8b66b218938fc302e0428f62a3b2817cf7a1994bfc9e08740ed58703b351
5
5
  SHA512:
6
- metadata.gz: 2220c53c58d8bd549f66849529584dcf836495f0f55dc5819bd01841131e213f24cdcda089ae63a9703ae08c6c5ae5514160b1ce1f181e1277d099765d2f683b
7
- data.tar.gz: 6ac01c39dddb568d29100e9bcd3a326d8bcc1b0cd4a54a4c507793fd0817d0709bfabbe6252873c7b422e8ed68f8a6b6d8f77f13b69d1012965b314611734a9c
6
+ metadata.gz: 21eaa799a903c49beb82b0979160b89158990853fe430ad9d491627b926a7706869ad1ade114c1446e6fb0b379bede780505155d0780b89d8d77bbecffe25f31
7
+ data.tar.gz: 750785782d68a8207286b929b0770df17315aa864bfcc25bc318d0562f655c16f636f4541353438ad626f1cd119f0262638386c9b48aae76a159c32c65157a7d
data/CHANGELOG CHANGED
@@ -1,6 +1,16 @@
1
+ === 1.17.1 (2023-01-05)
2
+
3
+ * Modify LDFLAGS when building on MacOS to allow undefined functions (delphaber) (#53)
4
+
5
+ === 1.17.0 (2022-10-05)
6
+
7
+ * Do not use pgresult_stream_any when using pg <1.4.4, to avoid double free in certain cases (larskanis) (#50)
8
+
9
+ * Support new pgresult_stream_any API in pg 1.4.4 (larskanis) (#50)
10
+
1
11
  === 1.16.0 (2022-08-16)
2
12
 
3
- * Fix memory leak when using streaming with 1.3.4+ (jeremyevans) (#48)
13
+ * Fix memory leak when using streaming with pg 1.3.4+ (jeremyevans) (#48)
4
14
 
5
15
  * Modify LDFLAGS when building on MacOS arm64 to allow undefined functions (maxsz) (#46)
6
16
 
@@ -2,7 +2,7 @@ require 'mkmf'
2
2
  $CFLAGS << " -O0 -g" if ENV['DEBUG']
3
3
  $CFLAGS << " -Drb_tainted_str_new=rb_str_new -DNO_TAINT" if RUBY_VERSION >= '2.7'
4
4
  $CFLAGS << " -Wall " unless RUBY_PLATFORM =~ /solaris/
5
- $LDFLAGS += " -Wl,-U,_pg_get_pgconn -Wl,-U,_pg_get_result_enc_idx -Wl,-U,_pgresult_get -Wl,-U,_pgresult_stream_any " if RUBY_PLATFORM =~ /arm64-darwin/
5
+ $LDFLAGS += " -Wl,-U,_pg_get_pgconn -Wl,-U,_pg_get_result_enc_idx -Wl,-U,_pgresult_get -Wl,-U,_pgresult_stream_any " if RUBY_PLATFORM =~ /darwin/
6
6
  dir_config('pg', ENV["POSTGRES_INCLUDE"] || (IO.popen("pg_config --includedir").readline.chomp rescue nil),
7
7
  ENV["POSTGRES_LIB"] || (IO.popen("pg_config --libdir").readline.chomp rescue nil))
8
8
 
@@ -1,4 +1,4 @@
1
- #define SEQUEL_PG_VERSION_INTEGER 11600
1
+ #define SEQUEL_PG_VERSION_INTEGER 11701
2
2
 
3
3
  #include <string.h>
4
4
  #include <stdio.h>
@@ -70,7 +70,7 @@
70
70
  PGconn* pg_get_pgconn(VALUE);
71
71
  PGresult* pgresult_get(VALUE);
72
72
  int pg_get_result_enc_idx(VALUE);
73
- VALUE pgresult_stream_any(VALUE self, void (*yielder)(VALUE, int, int, void*), void* data);
73
+ VALUE pgresult_stream_any(VALUE self, int (*yielder)(VALUE, int, int, void*), void* data);
74
74
 
75
75
  static int spg_use_ipaddr_alloc;
76
76
  static int spg_use_pg_get_result_enc_idx;
@@ -1672,7 +1672,7 @@ struct spg__yield_each_row_stream_data {
1672
1672
  char type;
1673
1673
  };
1674
1674
 
1675
- static void spg__yield_each_row_stream(VALUE rres, int ntuples, int nfields, void *rdata) {
1675
+ static int spg__yield_each_row_stream(VALUE rres, int ntuples, int nfields, void *rdata) {
1676
1676
  struct spg__yield_each_row_stream_data* data = (struct spg__yield_each_row_stream_data *)rdata;
1677
1677
  VALUE h = rb_hash_new();
1678
1678
  VALUE self = data->self;
@@ -1693,7 +1693,7 @@ static void spg__yield_each_row_stream(VALUE rres, int ntuples, int nfields, voi
1693
1693
  } else {
1694
1694
  rb_yield(h);
1695
1695
  }
1696
- PQclear(res);
1696
+ return 1; /* clear the result */
1697
1697
  }
1698
1698
 
1699
1699
  static VALUE spg__yield_each_row_internal(VALUE self, VALUE rconn, VALUE rres, PGresult *res, int enc_index, VALUE *colsyms, VALUE *colconvert) {
@@ -1868,7 +1868,7 @@ void Init_sequel_pg(void) {
1868
1868
  if (FIX2INT(RARRAY_AREF(c, 1)) >= 2) {
1869
1869
  spg_use_pg_get_result_enc_idx = 1;
1870
1870
  }
1871
- if (FIX2INT(RARRAY_AREF(c, 1)) > 3 || (FIX2INT(RARRAY_AREF(c, 1)) == 3 && FIX2INT(RARRAY_AREF(c, 2)) >= 4)) {
1871
+ if (FIX2INT(RARRAY_AREF(c, 1)) > 4 || (FIX2INT(RARRAY_AREF(c, 1)) == 4 && FIX2INT(RARRAY_AREF(c, 2)) >= 4)) {
1872
1872
  spg_use_pg_stream_any = 1;
1873
1873
  }
1874
1874
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_pg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Evans
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-16 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -77,9 +77,9 @@ metadata:
77
77
  bug_tracker_uri: https://github.com/jeremyevans/sequel_pg/issues
78
78
  changelog_uri: https://github.com/jeremyevans/sequel_pg/blob/master/CHANGELOG
79
79
  documentation_uri: https://github.com/jeremyevans/sequel_pg/blob/master/README.rdoc
80
- mailing_list_uri: https://groups.google.com/forum/#!forum/sequel-talk
80
+ mailing_list_uri: https://github.com/jeremyevans/sequel_pg/discussions
81
81
  source_code_uri: https://github.com/jeremyevans/sequel_pg
82
- post_install_message:
82
+ post_install_message:
83
83
  rdoc_options:
84
84
  - "--quiet"
85
85
  - "--line-numbers"
@@ -101,8 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.3.7
105
- signing_key:
104
+ rubygems_version: 3.4.1
105
+ signing_key:
106
106
  specification_version: 4
107
107
  summary: Faster SELECTs when using Sequel with pg
108
108
  test_files: []