pg 1.5.8-x86-mingw32 → 1.6.0.rc1-x86-mingw32
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Gemfile +7 -4
- data/History.md +37 -0
- data/README-Windows.rdoc +1 -1
- data/README.ja.md +3 -3
- data/README.md +4 -4
- data/Rakefile +56 -13
- data/ext/errorcodes.def +4 -5
- data/ext/errorcodes.txt +2 -5
- data/ext/extconf.rb +119 -13
- data/ext/gvl_wrappers.c +13 -2
- data/ext/gvl_wrappers.h +33 -0
- data/ext/pg.c +16 -5
- data/ext/pg.h +8 -9
- data/ext/pg_binary_decoder.c +150 -0
- data/ext/pg_binary_encoder.c +203 -7
- data/ext/pg_cancel_connection.c +360 -0
- data/ext/pg_coder.c +3 -5
- data/ext/pg_connection.c +337 -148
- data/ext/pg_copy_coder.c +2 -2
- data/ext/pg_record_coder.c +1 -1
- data/ext/pg_result.c +9 -11
- data/ext/pg_text_encoder.c +2 -2
- data/ext/pg_tuple.c +2 -2
- data/ext/pg_type_map.c +1 -1
- data/ext/pg_type_map_all_strings.c +1 -1
- data/ext/pg_type_map_by_class.c +1 -1
- data/ext/pg_type_map_by_column.c +1 -1
- data/ext/pg_type_map_by_mri_type.c +1 -1
- data/ext/pg_type_map_by_oid.c +1 -1
- data/ext/pg_type_map_in_ruby.c +1 -1
- data/lib/2.7/pg_ext.so +0 -0
- data/lib/3.0/pg_ext.so +0 -0
- data/lib/3.1/pg_ext.so +0 -0
- data/lib/3.2/pg_ext.so +0 -0
- data/lib/3.3/pg_ext.so +0 -0
- data/lib/pg/basic_type_registry.rb +2 -2
- data/lib/pg/cancel_connection.rb +30 -0
- data/lib/pg/connection.rb +187 -133
- data/lib/pg/version.rb +1 -1
- data/lib/pg.rb +13 -8
- data/pg.gemspec +5 -3
- data/{lib/x86-mingw32 → ports/x86-mingw32/lib}/libpq.dll +0 -0
- data.tar.gz.sig +0 -0
- metadata +11 -22
- metadata.gz.sig +0 -0
- data/.appveyor.yml +0 -42
- data/.gems +0 -6
- data/.gemtest +0 -0
- data/.github/workflows/binary-gems.yml +0 -117
- data/.github/workflows/source-gem.yml +0 -152
- data/.gitignore +0 -22
- data/.hgsigs +0 -34
- data/.hgtags +0 -41
- data/.irbrc +0 -23
- data/.pryrc +0 -23
- data/.tm_properties +0 -21
- data/.travis.yml +0 -49
- data/Rakefile.cross +0 -298
- data/lib/2.5/pg_ext.so +0 -0
- data/lib/2.6/pg_ext.so +0 -0
data/lib/pg/connection.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
require 'pg' unless defined?( PG )
|
5
|
-
require 'io/wait' unless ::IO.public_instance_methods(false).include?(:wait_readable)
|
5
|
+
require 'io/wait' unless ::IO.public_instance_methods(false).include?(:wait_readable) # for ruby < 3.0
|
6
6
|
require 'socket'
|
7
7
|
|
8
8
|
# The PostgreSQL connection class. The interface for this class is based on
|
@@ -117,7 +117,7 @@ class PG::Connection
|
|
117
117
|
return str
|
118
118
|
end
|
119
119
|
|
120
|
-
BinarySignature = "PGCOPY\n\377\r\n\0"
|
120
|
+
BinarySignature = "PGCOPY\n\377\r\n\0"
|
121
121
|
private_constant :BinarySignature
|
122
122
|
|
123
123
|
# call-seq:
|
@@ -166,9 +166,9 @@ class PG::Connection
|
|
166
166
|
# conn.put_copy_data ['more', 'data', 'to', 'copy']
|
167
167
|
# end
|
168
168
|
#
|
169
|
-
|
170
|
-
|
171
|
-
|
169
|
+
# All 4 CopyRow classes can take a type map to specify how the columns are mapped to and from the database format.
|
170
|
+
# For details see the particular CopyRow class description.
|
171
|
+
#
|
172
172
|
# PG::BinaryEncoder::CopyRow can be used to send data in binary format to the server.
|
173
173
|
# In this case copy_data generates the header and trailer data automatically:
|
174
174
|
# enco = PG::BinaryEncoder::CopyRow.new
|
@@ -356,21 +356,18 @@ class PG::Connection
|
|
356
356
|
end
|
357
357
|
end
|
358
358
|
|
359
|
-
#
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
ssl_attribute_names.each.with_object({}) do |n,h|
|
372
|
-
h[n] = ssl_attribute(n)
|
373
|
-
end
|
359
|
+
# call-seq:
|
360
|
+
# conn.ssl_attributes -> Hash<String,String>
|
361
|
+
#
|
362
|
+
# Returns SSL-related information about the connection as key/value pairs
|
363
|
+
#
|
364
|
+
# The available attributes varies depending on the SSL library being used,
|
365
|
+
# and the type of connection.
|
366
|
+
#
|
367
|
+
# See also #ssl_attribute
|
368
|
+
def ssl_attributes
|
369
|
+
ssl_attribute_names.each.with_object({}) do |n,h|
|
370
|
+
h[n] = ssl_attribute(n)
|
374
371
|
end
|
375
372
|
end
|
376
373
|
|
@@ -539,6 +536,25 @@ class PG::Connection
|
|
539
536
|
end
|
540
537
|
alias async_put_copy_end put_copy_end
|
541
538
|
|
539
|
+
if method_defined? :send_pipeline_sync
|
540
|
+
# call-seq:
|
541
|
+
# conn.pipeline_sync
|
542
|
+
#
|
543
|
+
# Marks a synchronization point in a pipeline by sending a sync message and flushing the send buffer.
|
544
|
+
# This serves as the delimiter of an implicit transaction and an error recovery point.
|
545
|
+
#
|
546
|
+
# See enter_pipeline_mode
|
547
|
+
#
|
548
|
+
# Raises PG::Error if the connection is not in pipeline mode or sending a sync message failed.
|
549
|
+
#
|
550
|
+
# Available since PostgreSQL-14
|
551
|
+
def pipeline_sync(*args)
|
552
|
+
send_pipeline_sync(*args)
|
553
|
+
flush
|
554
|
+
end
|
555
|
+
alias async_pipeline_sync pipeline_sync
|
556
|
+
end
|
557
|
+
|
542
558
|
if method_defined? :sync_encrypt_password
|
543
559
|
# call-seq:
|
544
560
|
# conn.encrypt_password( password, username, algorithm=nil ) -> String
|
@@ -586,130 +602,144 @@ class PG::Connection
|
|
586
602
|
end
|
587
603
|
alias async_reset reset
|
588
604
|
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
cl.
|
605
|
+
if defined?(PG::CancelConnection)
|
606
|
+
# PostgreSQL-17+
|
607
|
+
|
608
|
+
def sync_cancel
|
609
|
+
cancon = PG::CancelConnection.new(self)
|
610
|
+
cancon.sync_cancel
|
611
|
+
rescue PG::Error => err
|
612
|
+
err.to_s
|
613
|
+
end
|
614
|
+
|
615
|
+
# call-seq:
|
616
|
+
# conn.cancel() -> String
|
617
|
+
#
|
618
|
+
# Requests cancellation of the command currently being
|
619
|
+
# processed.
|
620
|
+
#
|
621
|
+
# Returns +nil+ on success, or a string containing the
|
622
|
+
# error message if a failure occurs.
|
623
|
+
#
|
624
|
+
# On PostgreSQL-17+ client libaray the class PG::CancelConnection is used.
|
625
|
+
# On older client library a pure ruby implementation is used.
|
626
|
+
def cancel
|
627
|
+
cancon = PG::CancelConnection.new(self)
|
628
|
+
cancon.async_connect_timeout = conninfo_hash[:connect_timeout]
|
629
|
+
cancon.async_cancel
|
630
|
+
rescue PG::Error => err
|
631
|
+
err.to_s
|
632
|
+
end
|
633
|
+
|
634
|
+
else
|
635
|
+
|
636
|
+
# PostgreSQL < 17
|
637
|
+
|
638
|
+
def cancel
|
639
|
+
be_pid = backend_pid
|
640
|
+
be_key = backend_key
|
641
|
+
cancel_request = [0x10, 1234, 5678, be_pid, be_key].pack("NnnNN")
|
642
|
+
|
643
|
+
if Fiber.respond_to?(:scheduler) && Fiber.scheduler && RUBY_PLATFORM =~ /mingw|mswin/
|
644
|
+
# Ruby's nonblocking IO is not really supported on Windows.
|
645
|
+
# We work around by using threads and explicit calls to wait_readable/wait_writable.
|
646
|
+
cl = Thread.new(socket_io.remote_address) { |ra| ra.connect }.value
|
647
|
+
begin
|
648
|
+
cl.write_nonblock(cancel_request)
|
649
|
+
rescue IO::WaitReadable, Errno::EINTR
|
650
|
+
cl.wait_writable
|
651
|
+
retry
|
652
|
+
end
|
653
|
+
begin
|
654
|
+
cl.read_nonblock(1)
|
655
|
+
rescue IO::WaitReadable, Errno::EINTR
|
656
|
+
cl.wait_readable
|
657
|
+
retry
|
658
|
+
rescue EOFError
|
633
659
|
end
|
660
|
+
else
|
661
|
+
cl = socket_io.remote_address.connect
|
662
|
+
# Send CANCEL_REQUEST_CODE and parameters
|
663
|
+
cl.write(cancel_request)
|
664
|
+
# Wait for the postmaster to close the connection, which indicates that it's processed the request.
|
665
|
+
cl.read(1)
|
634
666
|
end
|
635
|
-
cl.write(cancel_request)
|
636
|
-
cl.read(1)
|
637
|
-
else
|
638
|
-
cl = socket_io.remote_address.connect
|
639
|
-
# Send CANCEL_REQUEST_CODE and parameters
|
640
|
-
cl.write(cancel_request)
|
641
|
-
# Wait for the postmaster to close the connection, which indicates that it's processed the request.
|
642
|
-
cl.read(1)
|
643
|
-
end
|
644
667
|
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
668
|
+
cl.close
|
669
|
+
nil
|
670
|
+
rescue SystemCallError => err
|
671
|
+
err.to_s
|
672
|
+
end
|
649
673
|
end
|
650
674
|
alias async_cancel cancel
|
651
675
|
|
652
|
-
|
676
|
+
module Pollable
|
653
677
|
# Track the progress of the connection, waiting for the socket to become readable/writable before polling it
|
678
|
+
private def polling_loop(poll_meth, connect_timeout)
|
679
|
+
if (timeo = connect_timeout.to_i) && timeo > 0
|
680
|
+
host_count = conninfo_hash[:host].to_s.count(",") + 1
|
681
|
+
stop_time = timeo * host_count + Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
682
|
+
end
|
654
683
|
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
684
|
+
poll_status = PG::PGRES_POLLING_WRITING
|
685
|
+
until poll_status == PG::PGRES_POLLING_OK ||
|
686
|
+
poll_status == PG::PGRES_POLLING_FAILED
|
687
|
+
|
688
|
+
# Set single timeout to parameter "connect_timeout" but
|
689
|
+
# don't exceed total connection time of number-of-hosts * connect_timeout.
|
690
|
+
timeout = [timeo, stop_time - Process.clock_gettime(Process::CLOCK_MONOTONIC)].min if stop_time
|
691
|
+
event = if !timeout || timeout >= 0
|
692
|
+
# If the socket needs to read, wait 'til it becomes readable to poll again
|
693
|
+
case poll_status
|
694
|
+
when PG::PGRES_POLLING_READING
|
695
|
+
if defined?(IO::READABLE) # ruby-3.0+
|
696
|
+
socket_io.wait(IO::READABLE | IO::PRIORITY, timeout)
|
697
|
+
else
|
698
|
+
IO.select([socket_io], nil, [socket_io], timeout)
|
699
|
+
end
|
700
|
+
|
701
|
+
# ...and the same for when the socket needs to write
|
702
|
+
when PG::PGRES_POLLING_WRITING
|
703
|
+
if defined?(IO::WRITABLE) # ruby-3.0+
|
704
|
+
# Use wait instead of wait_readable, since connection errors are delivered as
|
705
|
+
# exceptional/priority events on Windows.
|
706
|
+
socket_io.wait(IO::WRITABLE | IO::PRIORITY, timeout)
|
707
|
+
else
|
708
|
+
# io#wait on ruby-2.x doesn't wait for priority, so fallback to IO.select
|
709
|
+
IO.select(nil, [socket_io], [socket_io], timeout)
|
710
|
+
end
|
677
711
|
end
|
678
|
-
|
679
|
-
#
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
712
|
+
end
|
713
|
+
# connection to server at "localhost" (127.0.0.1), port 5433 failed: timeout expired (PG::ConnectionBad)
|
714
|
+
# connection to server on socket "/var/run/postgresql/.s.PGSQL.5433" failed: No such file or directory
|
715
|
+
unless event
|
716
|
+
if self.class.send(:host_is_named_pipe?, host)
|
717
|
+
connhost = "on socket \"#{host}\""
|
718
|
+
elsif respond_to?(:hostaddr)
|
719
|
+
connhost = "at \"#{host}\" (#{hostaddr}), port #{port}"
|
685
720
|
else
|
686
|
-
|
687
|
-
IO.select(nil, [socket_io], [socket_io], timeout)
|
721
|
+
connhost = "at \"#{host}\", port #{port}"
|
688
722
|
end
|
723
|
+
raise PG::ConnectionBad.new("connection to server #{connhost} failed: timeout expired", connection: self)
|
689
724
|
end
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
unless event
|
694
|
-
if self.class.send(:host_is_named_pipe?, host)
|
695
|
-
connhost = "on socket \"#{host}\""
|
696
|
-
elsif respond_to?(:hostaddr)
|
697
|
-
connhost = "at \"#{host}\" (#{hostaddr}), port #{port}"
|
698
|
-
else
|
699
|
-
connhost = "at \"#{host}\", port #{port}"
|
700
|
-
end
|
701
|
-
raise PG::ConnectionBad.new("connection to server #{connhost} failed: timeout expired", connection: self)
|
725
|
+
|
726
|
+
# Check to see if it's finished or failed yet
|
727
|
+
poll_status = send( poll_meth )
|
702
728
|
end
|
703
729
|
|
704
|
-
|
705
|
-
|
730
|
+
unless status == PG::CONNECTION_OK
|
731
|
+
msg = error_message
|
732
|
+
finish
|
733
|
+
raise PG::ConnectionBad.new(msg, connection: self)
|
734
|
+
end
|
706
735
|
end
|
736
|
+
end
|
707
737
|
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
738
|
+
include Pollable
|
739
|
+
|
740
|
+
private def async_connect_or_reset(poll_meth)
|
741
|
+
# Track the progress of the connection, waiting for the socket to become readable/writable before polling it
|
742
|
+
polling_loop(poll_meth, conninfo_hash[:connect_timeout])
|
713
743
|
|
714
744
|
# Set connection to nonblocking to handle all blocking states in ruby.
|
715
745
|
# That way a fiber scheduler is able to handle IO requests.
|
@@ -827,6 +857,14 @@ class PG::Connection
|
|
827
857
|
iopts = PG::Connection.conninfo_parse(option_string).each_with_object({}){|h, o| o[h[:keyword].to_sym] = h[:val] if h[:val] }
|
828
858
|
iopts = PG::Connection.conndefaults.each_with_object({}){|h, o| o[h[:keyword].to_sym] = h[:val] if h[:val] }.merge(iopts)
|
829
859
|
|
860
|
+
if PG::BUNDLED_LIBPQ_WITH_UNIXSOCKET && iopts[:host].to_s.empty?
|
861
|
+
# Many distors patch the hardcoded default UnixSocket path in libpq to /var/run/postgresql instead of /tmp .
|
862
|
+
# We simply try them all.
|
863
|
+
iopts[:host] = "/var/run/postgresql" + # Ubuntu, Debian, Fedora, Opensuse
|
864
|
+
",/run/postgresql" + # Alpine, Archlinux, Gentoo
|
865
|
+
",/tmp" # Stock PostgreSQL
|
866
|
+
end
|
867
|
+
|
830
868
|
iopts_for_reset = iopts
|
831
869
|
if iopts[:hostaddr]
|
832
870
|
# hostaddr is provided -> no need to resolve hostnames
|
@@ -899,14 +937,29 @@ class PG::Connection
|
|
899
937
|
private_constant :REDIRECT_CLASS_METHODS
|
900
938
|
|
901
939
|
# These methods are affected by PQsetnonblocking
|
902
|
-
REDIRECT_SEND_METHODS =
|
940
|
+
REDIRECT_SEND_METHODS = {
|
903
941
|
:isnonblocking => [:async_isnonblocking, :sync_isnonblocking],
|
904
942
|
:nonblocking? => [:async_isnonblocking, :sync_isnonblocking],
|
905
943
|
:put_copy_data => [:async_put_copy_data, :sync_put_copy_data],
|
906
944
|
:put_copy_end => [:async_put_copy_end, :sync_put_copy_end],
|
907
945
|
:flush => [:async_flush, :sync_flush],
|
908
|
-
}
|
946
|
+
}
|
909
947
|
private_constant :REDIRECT_SEND_METHODS
|
948
|
+
if PG::Connection.instance_methods.include? :sync_pipeline_sync
|
949
|
+
if PG::Connection.instance_methods.include? :send_pipeline_sync
|
950
|
+
# PostgreSQL-17+
|
951
|
+
REDIRECT_SEND_METHODS.merge!({
|
952
|
+
:pipeline_sync => [:async_pipeline_sync, :sync_pipeline_sync],
|
953
|
+
})
|
954
|
+
else
|
955
|
+
# PostgreSQL-14+
|
956
|
+
REDIRECT_SEND_METHODS.merge!({
|
957
|
+
:pipeline_sync => [:sync_pipeline_sync, :sync_pipeline_sync],
|
958
|
+
})
|
959
|
+
end
|
960
|
+
end
|
961
|
+
PG.make_shareable(REDIRECT_SEND_METHODS)
|
962
|
+
|
910
963
|
REDIRECT_METHODS = {
|
911
964
|
:exec => [:async_exec, :sync_exec],
|
912
965
|
:query => [:async_exec, :sync_exec],
|
@@ -923,12 +976,13 @@ class PG::Connection
|
|
923
976
|
:set_client_encoding => [:async_set_client_encoding, :sync_set_client_encoding],
|
924
977
|
:client_encoding= => [:async_set_client_encoding, :sync_set_client_encoding],
|
925
978
|
:cancel => [:async_cancel, :sync_cancel],
|
979
|
+
:encrypt_password => [:async_encrypt_password, :sync_encrypt_password],
|
926
980
|
}
|
927
981
|
private_constant :REDIRECT_METHODS
|
928
|
-
|
929
|
-
if PG::Connection.instance_methods.include? :async_encrypt_password
|
982
|
+
if PG::Connection.instance_methods.include? :async_close_prepared
|
930
983
|
REDIRECT_METHODS.merge!({
|
931
|
-
:
|
984
|
+
:close_prepared => [:async_close_prepared, :sync_close_prepared],
|
985
|
+
:close_portal => [:async_close_portal, :sync_close_portal],
|
932
986
|
})
|
933
987
|
end
|
934
988
|
PG.make_shareable(REDIRECT_METHODS)
|
data/lib/pg/version.rb
CHANGED
data/lib/pg.rb
CHANGED
@@ -6,11 +6,12 @@
|
|
6
6
|
module PG
|
7
7
|
|
8
8
|
# Is this file part of a fat binary gem with bundled libpq?
|
9
|
-
|
10
|
-
|
9
|
+
# This path must be enabled by add_dll_directory on Windows.
|
10
|
+
gplat = Gem::Platform.local
|
11
|
+
bundled_libpq_path = Dir[File.expand_path("../ports/#{gplat.cpu}-#{gplat.os}*/lib", __dir__)].first
|
12
|
+
if bundled_libpq_path
|
11
13
|
POSTGRESQL_LIB_PATH = bundled_libpq_path
|
12
14
|
else
|
13
|
-
bundled_libpq_path = nil
|
14
15
|
# Try to load libpq path as found by extconf.rb
|
15
16
|
begin
|
16
17
|
require "pg/postgresql_lib_path"
|
@@ -22,7 +23,8 @@ module PG
|
|
22
23
|
end
|
23
24
|
|
24
25
|
add_dll_path = proc do |path, &block|
|
25
|
-
if RUBY_PLATFORM =~/(mswin|mingw)/i && path
|
26
|
+
if RUBY_PLATFORM =~/(mswin|mingw)/i && path
|
27
|
+
BUNDLED_LIBPQ_WITH_UNIXSOCKET = false
|
26
28
|
begin
|
27
29
|
require 'ruby_installer/runtime'
|
28
30
|
RubyInstaller::Runtime.add_dll_directory(path, &block)
|
@@ -33,19 +35,21 @@ module PG
|
|
33
35
|
ENV['PATH'] = old_path
|
34
36
|
end
|
35
37
|
else
|
36
|
-
#
|
38
|
+
# libpq is found by a relative rpath in the cross compiled extension dll
|
39
|
+
# or by the system library loader
|
37
40
|
block.call
|
41
|
+
BUNDLED_LIBPQ_WITH_UNIXSOCKET = RUBY_PLATFORM=~/linux/i && PG::IS_BINARY_GEM
|
38
42
|
end
|
39
43
|
end
|
40
44
|
|
41
45
|
# Add a load path to the one retrieved from pg_config
|
42
46
|
add_dll_path.call(POSTGRESQL_LIB_PATH) do
|
43
|
-
|
44
|
-
#
|
47
|
+
begin
|
48
|
+
# Try the <major>.<minor> subdirectory for fat binary gems
|
45
49
|
major_minor = RUBY_VERSION[ /^(\d+\.\d+)/ ] or
|
46
50
|
raise "Oops, can't extract the major/minor version from #{RUBY_VERSION.dump}"
|
47
51
|
require "#{major_minor}/pg_ext"
|
48
|
-
|
52
|
+
rescue LoadError
|
49
53
|
require 'pg_ext'
|
50
54
|
end
|
51
55
|
end
|
@@ -111,6 +115,7 @@ module PG
|
|
111
115
|
require 'pg/coder'
|
112
116
|
require 'pg/type_map_by_column'
|
113
117
|
require 'pg/connection'
|
118
|
+
require 'pg/cancel_connection'
|
114
119
|
require 'pg/result'
|
115
120
|
require 'pg/tuple'
|
116
121
|
autoload :VERSION, 'pg/version'
|
data/pg.gemspec
CHANGED
@@ -10,10 +10,10 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["ged@FaerieMUD.org", "lars@greiz-reinsdorf.de"]
|
11
11
|
|
12
12
|
spec.summary = "Pg is the Ruby interface to the PostgreSQL RDBMS"
|
13
|
-
spec.description = "Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
|
13
|
+
spec.description = "Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL 10 and later."
|
14
14
|
spec.homepage = "https://github.com/ged/ruby-pg"
|
15
15
|
spec.license = "BSD-2-Clause"
|
16
|
-
spec.required_ruby_version = ">= 2.
|
16
|
+
spec.required_ruby_version = ">= 2.7"
|
17
17
|
|
18
18
|
spec.metadata["homepage_uri"] = spec.homepage
|
19
19
|
spec.metadata["source_code_uri"] = "https://github.com/ged/ruby-pg"
|
@@ -23,7 +23,9 @@ Gem::Specification.new do |spec|
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
25
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
-
`git ls-files -z`.split("\x0").reject
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{\A(?:test|spec|features|translation|\.)})
|
28
|
+
end
|
27
29
|
end
|
28
30
|
spec.extensions = ["ext/extconf.rb"]
|
29
31
|
spec.require_paths = ["lib"]
|
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
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.
|
4
|
+
version: 1.6.0.rc1
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -34,10 +34,10 @@ cert_chain:
|
|
34
34
|
5wFER6XhvvLDFAMh/jMg+s7Wd5SbSHgHNSUaUGVtdWkVPOer6oF0aLdZUR3CETkn
|
35
35
|
5nWXZma/BUd3YgYA/Xumc6QQqIS4p7mr
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date: 2024-
|
37
|
+
date: 2024-11-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
|
+
10 and later.
|
41
41
|
email:
|
42
42
|
- ged@FaerieMUD.org
|
43
43
|
- lars@greiz-reinsdorf.de
|
@@ -56,6 +56,7 @@ extra_rdoc_files:
|
|
56
56
|
- ext/pg.h
|
57
57
|
- ext/pg_binary_decoder.c
|
58
58
|
- ext/pg_binary_encoder.c
|
59
|
+
- ext/pg_cancel_connection.c
|
59
60
|
- ext/pg_coder.c
|
60
61
|
- ext/pg_connection.c
|
61
62
|
- ext/pg_copy_coder.c
|
@@ -82,6 +83,7 @@ extra_rdoc_files:
|
|
82
83
|
- lib/pg/binary_decoder/date.rb
|
83
84
|
- lib/pg/binary_decoder/timestamp.rb
|
84
85
|
- lib/pg/binary_encoder/timestamp.rb
|
86
|
+
- lib/pg/cancel_connection.rb
|
85
87
|
- lib/pg/coder.rb
|
86
88
|
- lib/pg/connection.rb
|
87
89
|
- lib/pg/exceptions.rb
|
@@ -100,18 +102,6 @@ extra_rdoc_files:
|
|
100
102
|
- lib/pg/type_map_by_column.rb
|
101
103
|
- lib/pg/version.rb
|
102
104
|
files:
|
103
|
-
- ".appveyor.yml"
|
104
|
-
- ".gems"
|
105
|
-
- ".gemtest"
|
106
|
-
- ".github/workflows/binary-gems.yml"
|
107
|
-
- ".github/workflows/source-gem.yml"
|
108
|
-
- ".gitignore"
|
109
|
-
- ".hgsigs"
|
110
|
-
- ".hgtags"
|
111
|
-
- ".irbrc"
|
112
|
-
- ".pryrc"
|
113
|
-
- ".tm_properties"
|
114
|
-
- ".travis.yml"
|
115
105
|
- BSDL
|
116
106
|
- Contributors.rdoc
|
117
107
|
- Gemfile
|
@@ -124,7 +114,6 @@ files:
|
|
124
114
|
- README.ja.md
|
125
115
|
- README.md
|
126
116
|
- Rakefile
|
127
|
-
- Rakefile.cross
|
128
117
|
- certs/ged.pem
|
129
118
|
- certs/kanis@comcard.de.pem
|
130
119
|
- certs/larskanis-2022.pem
|
@@ -140,6 +129,7 @@ files:
|
|
140
129
|
- ext/pg.h
|
141
130
|
- ext/pg_binary_decoder.c
|
142
131
|
- ext/pg_binary_encoder.c
|
132
|
+
- ext/pg_cancel_connection.c
|
143
133
|
- ext/pg_coder.c
|
144
134
|
- ext/pg_connection.c
|
145
135
|
- ext/pg_copy_coder.c
|
@@ -161,8 +151,6 @@ files:
|
|
161
151
|
- ext/vc/pg.sln
|
162
152
|
- ext/vc/pg_18/pg.vcproj
|
163
153
|
- ext/vc/pg_19/pg_19.vcproj
|
164
|
-
- lib/2.5/pg_ext.so
|
165
|
-
- lib/2.6/pg_ext.so
|
166
154
|
- lib/2.7/pg_ext.so
|
167
155
|
- lib/3.0/pg_ext.so
|
168
156
|
- lib/3.1/pg_ext.so
|
@@ -176,6 +164,7 @@ files:
|
|
176
164
|
- lib/pg/binary_decoder/date.rb
|
177
165
|
- lib/pg/binary_decoder/timestamp.rb
|
178
166
|
- lib/pg/binary_encoder/timestamp.rb
|
167
|
+
- lib/pg/cancel_connection.rb
|
179
168
|
- lib/pg/coder.rb
|
180
169
|
- lib/pg/connection.rb
|
181
170
|
- lib/pg/exceptions.rb
|
@@ -193,7 +182,6 @@ files:
|
|
193
182
|
- lib/pg/tuple.rb
|
194
183
|
- lib/pg/type_map_by_column.rb
|
195
184
|
- lib/pg/version.rb
|
196
|
-
- lib/x86-mingw32/libpq.dll
|
197
185
|
- misc/openssl-pg-segfault.rb
|
198
186
|
- misc/postgres/History.txt
|
199
187
|
- misc/postgres/Manifest.txt
|
@@ -206,6 +194,7 @@ files:
|
|
206
194
|
- misc/ruby-pg/Rakefile
|
207
195
|
- misc/ruby-pg/lib/ruby/pg.rb
|
208
196
|
- pg.gemspec
|
197
|
+
- ports/x86-mingw32/lib/libpq.dll
|
209
198
|
- rakelib/task_extension.rb
|
210
199
|
- sample/array_insert.rb
|
211
200
|
- sample/async_api.rb
|
@@ -246,15 +235,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
246
235
|
requirements:
|
247
236
|
- - ">="
|
248
237
|
- !ruby/object:Gem::Version
|
249
|
-
version: '2.
|
238
|
+
version: '2.7'
|
250
239
|
- - "<"
|
251
240
|
- !ruby/object:Gem::Version
|
252
241
|
version: 3.4.dev
|
253
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
254
243
|
requirements:
|
255
|
-
- - "
|
244
|
+
- - ">"
|
256
245
|
- !ruby/object:Gem::Version
|
257
|
-
version:
|
246
|
+
version: 1.3.1
|
258
247
|
requirements: []
|
259
248
|
rubygems_version: 3.3.26
|
260
249
|
signing_key:
|
metadata.gz.sig
CHANGED
Binary file
|
data/.appveyor.yml
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
image: Visual Studio 2022
|
2
|
-
|
3
|
-
init:
|
4
|
-
- set PATH=C:/Ruby%ruby_version%/bin;c:/Program Files/Git/cmd;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0;C:/Program Files/Mercurial
|
5
|
-
- set RUBYOPT=--verbose
|
6
|
-
install:
|
7
|
-
- ps: |
|
8
|
-
if ($env:RUBYDOWNLOAD -ne $null) {
|
9
|
-
$(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-head-$env:RUBYDOWNLOAD.exe", "$pwd/ruby-setup.exe")
|
10
|
-
cmd /c ruby-setup.exe /currentuser /verysilent /dir=C:/Ruby$env:ruby_version
|
11
|
-
}
|
12
|
-
- cmd: |
|
13
|
-
ridk enable
|
14
|
-
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-pkgconf ${MINGW_PACKAGE_PREFIX}-libyaml ${MINGW_PACKAGE_PREFIX}-gcc"
|
15
|
-
- ruby --version
|
16
|
-
- gem --version
|
17
|
-
- gem install bundler --conservative
|
18
|
-
- bundle install
|
19
|
-
- ps: |
|
20
|
-
if ($env:PGVERSION -ne $null)
|
21
|
-
{
|
22
|
-
$(new-object net.webclient).DownloadFile('http://get.enterprisedb.com/postgresql/postgresql-' + $env:PGVERSION + '.exe', 'C:/postgresql-setup.exe')
|
23
|
-
cmd /c "C:/postgresql-setup.exe" --mode unattended --extract-only 1
|
24
|
-
|
25
|
-
$env:PATH = 'C:/Program Files/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
|
26
|
-
$env:PATH = 'C:/Program Files (x86)/PostgreSQL/' + $env:PGVER + '/bin;' + $env:PATH
|
27
|
-
} else {
|
28
|
-
c:/msys64/usr/bin/bash -lc "pacman -S --noconfirm --needed `${MINGW_PACKAGE_PREFIX}-postgresql"
|
29
|
-
}
|
30
|
-
- echo %PATH%
|
31
|
-
- pg_config
|
32
|
-
build_script:
|
33
|
-
- bundle exec rake -rdevkit compile --trace
|
34
|
-
test_script:
|
35
|
-
- bundle exec rake test PG_DEBUG=0
|
36
|
-
on_failure:
|
37
|
-
- find -name mkmf.log | xargs cat
|
38
|
-
environment:
|
39
|
-
matrix:
|
40
|
-
- ruby_version: "head"
|
41
|
-
RUBYDOWNLOAD: x64
|
42
|
-
- ruby_version: "30-x64"
|