pg 1.3.5 → 1.4.4

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: 0bb3782224d0c471417ceaa47d1355d5a06be2590fb3671fde73882346db0c5c
4
- data.tar.gz: cd728b238d0b174f02a31c38afbd990177f81eec8516a1c953ee7bade1ddb4c6
3
+ metadata.gz: 7796bdf07cbb37a4b63c29b24e18e312682eca28a98042ce7e050c99b6fa6b98
4
+ data.tar.gz: 4c2e99d5a102f695f82f3f0fe626a63eff42a416fc1db99175aa3dbecac0e010
5
5
  SHA512:
6
- metadata.gz: d7b3ad8293281fb830274dc0e3d6e3c59c1dca85ea4f112f0aaf3a7629f61e315747f1e6ecad96e7a9528d42eeb3baafb819b7360d02acfc636ae7cb2d24ef42
7
- data.tar.gz: f2476f2c7b1950346adf87c3675b838b9c57c909d6d787b50f4cf418ccb51296a02677faac7910378a665daa087f2aa552375f72ca42ba428e539cf07e80392c
6
+ metadata.gz: ef67ef88819cf75dd74b8f15843b44a45dfe580bb8c51a632cef5a38c00b519cb81c0a84191fd94e281cb7e8264ebc31a32b9ad51b7e7e9c17e514fcf5f023e0
7
+ data.tar.gz: 3bec55fa8e3a23dcef29673566f5c0570be43e319af84838625fcfe87aa81ff8e9b7ab9c1bed6ae6c28097d93a6675dd3ee5b03c9ece601f87be90e2d885ca75
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1 @@
1
- ��`��<� .B� /m��u��+�
2
- �8�e㽟���P\'����+�f&̮�.M4��S�z��t�<���<�V���#�$��4��5�2(mK���� .��D�UĹh��(�(������6�c��C��b+��?T���x���(�gd�i�K��%�vD�0H�kK�)�G2"ތ6::Z!�2��3Be�$r�uo��K�d,_���������\���E� �|����eĘ����!2@�僑 *4����BT+ګ�m*Zp6��
3
- �NNȼ�<�m9A@�����
4
- ~$�|��ذyB�R�vfj�=d+�j6m��&�B1��:���2<�+���!��� �܎�+��Q���\��d�e'/�JR��r�vF�
1
+ }�"�����B�`�5'˟���1��d�x�;� �Y�=�r4S�y��Z��3��R$Z2�� V7O@�����m6�%���P��ُ~���0{����hꉖ4� D�:��`�4�eb��ݫ%���e'4�ܓ�X�E�%$k���n� .�Yw#���� ���-|#@n=���^�V�b�I>����Ŕ���o*l�O�5���UU�chR��飹�+�I��G��ڼ���'6Z�$#�_1W��Ah3�
@@ -45,7 +45,7 @@ jobs:
45
45
  include:
46
46
  - ruby: "3.1"
47
47
  platform: "x64-mingw-ucrt"
48
- PGVERSION: 14.2-1-windows-x64
48
+ PGVERSION: 15.0-rc1-windows-x64
49
49
  - ruby: "2.5"
50
50
  platform: "x64-mingw32"
51
51
  PGVERSION: 10.20-1-windows
@@ -83,4 +83,4 @@ jobs:
83
83
  - run: bundle install
84
84
  - run: gem install --local pg-*${{ matrix.platform }}.gem --verbose
85
85
  - name: Run specs
86
- run: ruby -rpg -S rspec spec/**/*_spec.rb
86
+ run: ruby -rpg -S rspec -fd spec/**/*_spec.rb
@@ -31,7 +31,7 @@ jobs:
31
31
  include:
32
32
  - os: windows
33
33
  ruby: "head"
34
- PGVERSION: 14.2-1-windows-x64
34
+ PGVERSION: 15.0-rc1-windows-x64
35
35
  PGVER: "14"
36
36
  - os: windows
37
37
  ruby: "2.5"
@@ -54,13 +54,14 @@ jobs:
54
54
  PGVER: "14"
55
55
  - os: macos
56
56
  ruby: "head"
57
- PGVERSION: 14.2-1-osx
58
- PGVER: "14"
57
+ PGVERSION: 13.8-1-osx
58
+ PGVER: "13"
59
59
 
60
60
  runs-on: ${{ matrix.os }}-latest
61
61
  env:
62
62
  PGVERSION: ${{ matrix.PGVERSION }}
63
63
  PGVER: ${{ matrix.PGVER }}
64
+ MAKE: make -j2 V=1
64
65
 
65
66
  steps:
66
67
  - uses: actions/checkout@v2
@@ -107,8 +108,9 @@ jobs:
107
108
  if: matrix.os == 'macos'
108
109
  run: |
109
110
  wget https://get.enterprisedb.com/postgresql/postgresql-$PGVERSION-binaries.zip && \
110
- unzip postgresql-$PGVERSION-binaries.zip && \
111
- echo `pwd`/pgsql/bin >> $GITHUB_PATH
111
+ sudo mkdir -p /Library/PostgreSQL && \
112
+ sudo unzip postgresql-$PGVERSION-binaries.zip -d /Library/PostgreSQL/$PGVER && \
113
+ echo /Library/PostgreSQL/$PGVER/bin >> $GITHUB_PATH
112
114
 
113
115
  - run: gem update --system
114
116
  - run: bundle install
data/History.rdoc CHANGED
@@ -1,3 +1,59 @@
1
+ == v1.4.4 [2022-10-11] Lars Kanis <lars@greiz-reinsdorf.de>
2
+
3
+ - Revert to let libpq do the host iteration while connecting. #485
4
+ Ensure that parameter `connect_timeout` is still respected.
5
+ - Handle multiple hosts in the connection string, where only one host has writable session. #476
6
+ - Add some useful information to PG::Connection#inspect. #487
7
+ - Support new pgresult_stream_any API in sequel_pg-1.17.0. #481
8
+ - Update Windows fat binary gem to PostgreSQL-14.5.
9
+
10
+
11
+ == v1.4.3 [2022-08-09] Lars Kanis <lars@greiz-reinsdorf.de>
12
+
13
+ - Avoid memory bloat possible in put_copy_data in pg-1.4.0 to 1.4.2. #473
14
+ - Use Encoding::BINARY for JOHAB, removing some useless code. #472
15
+
16
+
17
+ == v1.4.2 [2022-07-27] Lars Kanis <lars@greiz-reinsdorf.de>
18
+
19
+ Bugfixes:
20
+
21
+ - Properly handle empty host parameter when connecting. #471
22
+ - Update Windows fat binary gem to OpenSSL-1.1.1q.
23
+
24
+
25
+ == v1.4.1 [2022-06-24] Lars Kanis <lars@greiz-reinsdorf.de>
26
+
27
+ Bugfixes:
28
+
29
+ - Fix another ruby-2.7 keyword warning. #465
30
+ - Allow PG::Error to be created without arguments. #466
31
+
32
+
33
+ == v1.4.0 [2022-06-20] Lars Kanis <lars@greiz-reinsdorf.de>
34
+
35
+ Added:
36
+
37
+ - Add PG::Connection#hostaddr, present since PostgreSQL-12. #453
38
+ - Add PG::Connection.conninfo_parse to wrap PQconninfoParse. #453
39
+
40
+ Bugfixes:
41
+
42
+ - Try IPv6 and IPv4 addresses, if DNS resolves to both. #452
43
+ - Re-add block-call semantics to PG::Connection.new accidently removed in pg-1.3.0. #454
44
+ - Handle client error after all data consumed in #copy_data for output. #455
45
+ - Avoid spurious keyword argument warning on Ruby 2.7. #456
46
+ - Change connection setup to respect connect_timeout parameter. #459
47
+ - Fix indefinite hang in case of connection error on Windows #458
48
+ - Set connection attribute of PG::Error in various places where it was missing. #461
49
+ - Fix transaction leak on early break/return. #463
50
+ - Update Windows fat binary gem to OpenSSL-1.1.1o and PostgreSQL-14.4.
51
+
52
+ Enhancements:
53
+
54
+ - Don't flush at each put_copy_data call, but flush at get_result. #462
55
+
56
+
1
57
  == v1.3.5 [2022-03-31] Lars Kanis <lars@greiz-reinsdorf.de>
2
58
 
3
59
  Bugfixes:
data/README.rdoc CHANGED
@@ -171,12 +171,31 @@ The following type maps are prefilled with type mappings from the PG::BasicTypeR
171
171
  To report bugs, suggest features, or check out the source with Git,
172
172
  {check out the project page}[https://github.com/ged/ruby-pg].
173
173
 
174
- After checking out the source, run:
174
+ After checking out the source, install all dependencies:
175
175
 
176
- $ rake newb
176
+ $ bundle install
177
177
 
178
- This task will install any missing dependencies, run the tests/specs, and
179
- generate the API documentation.
178
+ Cleanup extension files, packaging files, test databases:
179
+
180
+ $ rake clean
181
+
182
+ Compile extension:
183
+
184
+ $ rake compile
185
+
186
+ Run tests/specs with PostgreSQL tools like `initdb` in the path:
187
+
188
+ $ PATH=$PATH:/usr/lib/postgresql/14/bin rake test
189
+
190
+ Or run a specific test with the line number:
191
+
192
+ $ PATH=$PATH:/usr/lib/postgresql/14/bin rspec -Ilib -fd spec/pg/connection_spec.rb:455
193
+
194
+ Generate the API documentation:
195
+
196
+ $ rake docs
197
+
198
+ Make sure, that all bugs and new features are verified by tests.
180
199
 
181
200
  The current maintainers are Michael Granger <ged@FaerieMUD.org> and
182
201
  Lars Kanis <lars@greiz-reinsdorf.de>.
@@ -184,7 +203,7 @@ Lars Kanis <lars@greiz-reinsdorf.de>.
184
203
 
185
204
  == Copying
186
205
 
187
- Copyright (c) 1997-2019 by the authors.
206
+ Copyright (c) 1997-2022 by the authors.
188
207
 
189
208
  * Jeff Davis <ruby-pg@j-davis.com>
190
209
  * Guy Decoux (ts) <decoux@moulon.inra.fr>
data/Rakefile CHANGED
@@ -16,14 +16,14 @@ LIBDIR = BASEDIR + 'lib'
16
16
  EXTDIR = BASEDIR + 'ext'
17
17
  PKGDIR = BASEDIR + 'pkg'
18
18
  TMPDIR = BASEDIR + 'tmp'
19
- TESTDIR = BASEDIR + "tmp_test_specs"
19
+ TESTDIR = BASEDIR + "tmp_test_*"
20
20
 
21
21
  DLEXT = RbConfig::CONFIG['DLEXT']
22
22
  EXT = LIBDIR + "pg_ext.#{DLEXT}"
23
23
 
24
24
  GEMSPEC = 'pg.gemspec'
25
25
 
26
- CLOBBER.include( TESTDIR.to_s )
26
+ CLEAN.include( TESTDIR.to_s )
27
27
  CLEAN.include( PKGDIR.to_s, TMPDIR.to_s )
28
28
  CLEAN.include "lib/*/libpq.dll"
29
29
  CLEAN.include "lib/pg_ext.*"
data/Rakefile.cross CHANGED
@@ -31,8 +31,8 @@ class CrossLibrary < OpenStruct
31
31
  self.host_platform = toolchain
32
32
 
33
33
  # Cross-compilation constants
34
- self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1m'
35
- self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.2'
34
+ self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1q'
35
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '14.5'
36
36
 
37
37
  # Check if symlinks work in the current working directory.
38
38
  # This fails, if rake-compiler-dock is running on a Windows box.
data/ext/extconf.rb CHANGED
@@ -1,5 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
1
  require 'pp'
4
2
  require 'mkmf'
5
3
 
@@ -169,32 +167,3 @@ end
169
167
  create_header()
170
168
  create_makefile( "pg_ext" )
171
169
 
172
-
173
- def message!(important_message)
174
- message important_message
175
- if !$stdout.tty? && File.chardev?('/dev/tty')
176
- File.open('/dev/tty', 'w') do |tty|
177
- tty.print important_message
178
- end
179
- end
180
- rescue
181
- end
182
-
183
- if "2022-04-01" == Time.now.strftime("%Y-%m-%d")
184
- message! <<-EOM
185
- ===================================================================
186
- HEADS UP! Prepare for pg-1.4.2022 ! 🎉🎉🎉
187
-
188
- Now that psycopg3 has most of the features of ruby-pg, we plan to
189
- switch to using it as our foundation for the next pg release.
190
- It will run through pycall and requires a working python setup.
191
- This will minimize our development and maintenance efforts, since
192
- it allows us to use one and the same code base for both programming
193
- languages - ruby and python. 👏😃
194
-
195
- And we follow the recent merge of the Django and Rails teams! ❤️
196
-
197
- Stay up-to-date at https://github.com/ged/ruby-pg/issues/449
198
- ===================================================================
199
- EOM
200
- end
data/ext/pg.c CHANGED
@@ -47,7 +47,6 @@
47
47
  */
48
48
 
49
49
  #include "pg.h"
50
- #include "pg_config.h"
51
50
 
52
51
  int pg_skip_deprecation_warning;
53
52
  VALUE rb_mPG;
@@ -127,26 +126,6 @@ const char * const (pg_enc_pg2ruby_mapping[][2]) = {
127
126
  static struct st_table *enc_pg2ruby;
128
127
 
129
128
 
130
- /*
131
- * Look up the JOHAB encoding, creating it as a dummy encoding if it's not
132
- * already defined.
133
- */
134
- static rb_encoding *
135
- pg_find_or_create_johab(void)
136
- {
137
- static const char * const aliases[] = { "JOHAB", "Windows-1361", "CP1361" };
138
- int enc_index;
139
- size_t i;
140
-
141
- for (i = 0; i < sizeof(aliases)/sizeof(aliases[0]); ++i) {
142
- enc_index = rb_enc_find_index(aliases[i]);
143
- if (enc_index > 0) return rb_enc_from_index(enc_index);
144
- }
145
-
146
- enc_index = rb_define_dummy_encoding(aliases[0]);
147
- return rb_enc_from_index(enc_index);
148
- }
149
-
150
129
  /*
151
130
  * Return the given PostgreSQL encoding ID as an rb_encoding.
152
131
  *
@@ -187,10 +166,6 @@ pg_get_pg_encname_as_rb_encoding( const char *pg_encname )
187
166
  return rb_enc_find( pg_enc_pg2ruby_mapping[i][1] );
188
167
  }
189
168
 
190
- /* JOHAB isn't a builtin encoding, so make up a dummy encoding if it's seen */
191
- if ( strncmp(pg_encname, "JOHAB", 5) == 0 )
192
- return pg_find_or_create_johab();
193
-
194
169
  /* Fallthrough to ASCII-8BIT */
195
170
  return rb_ascii8bit_encoding();
196
171
  }
@@ -377,7 +352,7 @@ pg_s_init_ssl(VALUE self, VALUE do_ssl)
377
352
  **************************************************************************/
378
353
 
379
354
  void
380
- Init_pg_ext()
355
+ Init_pg_ext(void)
381
356
  {
382
357
  if( RTEST(rb_eval_string("ENV['PG_SKIP_DEPRECATION_WARNING']")) ){
383
358
  /* Set all bits to disable all deprecation warnings. */
data/ext/pg.h CHANGED
@@ -57,6 +57,7 @@
57
57
  #endif
58
58
 
59
59
  /* PostgreSQL headers */
60
+ #include "pg_config.h"
60
61
  #include "libpq-fe.h"
61
62
  #include "libpq/libpq-fs.h" /* large-object interface */
62
63
  #include "pg_config_manual.h"
@@ -205,7 +205,7 @@ pg_bin_dec_timestamp(t_pg_coder *conv, const char *val, int len, int tuple, int
205
205
  */
206
206
 
207
207
  void
208
- init_pg_binary_decoder()
208
+ init_pg_binary_decoder(void)
209
209
  {
210
210
  /* This module encapsulates all decoder classes with binary input format */
211
211
  rb_mPG_BinaryDecoder = rb_define_module_under( rb_mPG, "BinaryDecoder" );
@@ -139,7 +139,7 @@ pg_bin_enc_from_base64(t_pg_coder *conv, VALUE value, char *out, VALUE *intermed
139
139
  }
140
140
 
141
141
  void
142
- init_pg_binary_encoder()
142
+ init_pg_binary_encoder(void)
143
143
  {
144
144
  /* This module encapsulates all encoder classes with binary output format */
145
145
  rb_mPG_BinaryEncoder = rb_define_module_under( rb_mPG, "BinaryEncoder" );
data/ext/pg_coder.c CHANGED
@@ -537,7 +537,7 @@ pg_coder_dec_func(t_pg_coder *this, int binary)
537
537
 
538
538
 
539
539
  void
540
- init_pg_coder()
540
+ init_pg_coder(void)
541
541
  {
542
542
  s_id_encode = rb_intern("encode");
543
543
  s_id_decode = rb_intern("decode");