pg 1.2.3 → 1.4.4

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.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.appveyor.yml +36 -0
  4. data/.gems +6 -0
  5. data/.github/workflows/binary-gems.yml +86 -0
  6. data/.github/workflows/source-gem.yml +131 -0
  7. data/.gitignore +13 -0
  8. data/.hgsigs +34 -0
  9. data/.hgtags +41 -0
  10. data/.irbrc +23 -0
  11. data/.pryrc +23 -0
  12. data/.tm_properties +21 -0
  13. data/.travis.yml +49 -0
  14. data/Gemfile +14 -0
  15. data/History.rdoc +209 -7
  16. data/Manifest.txt +0 -1
  17. data/README.rdoc +31 -11
  18. data/Rakefile +27 -138
  19. data/Rakefile.cross +8 -5
  20. data/certs/ged.pem +24 -0
  21. data/certs/larskanis-2022.pem +26 -0
  22. data/ext/errorcodes.def +8 -0
  23. data/ext/errorcodes.rb +0 -0
  24. data/ext/errorcodes.txt +3 -1
  25. data/ext/extconf.rb +100 -25
  26. data/ext/gvl_wrappers.c +4 -0
  27. data/ext/gvl_wrappers.h +23 -0
  28. data/ext/pg.c +59 -29
  29. data/ext/pg.h +20 -1
  30. data/ext/pg_binary_decoder.c +1 -1
  31. data/ext/pg_binary_encoder.c +1 -1
  32. data/ext/pg_coder.c +83 -29
  33. data/ext/pg_connection.c +856 -656
  34. data/ext/pg_copy_coder.c +46 -17
  35. data/ext/pg_errors.c +1 -1
  36. data/ext/pg_record_coder.c +46 -16
  37. data/ext/pg_result.c +88 -49
  38. data/ext/pg_text_decoder.c +2 -2
  39. data/ext/pg_text_encoder.c +7 -7
  40. data/ext/pg_tuple.c +50 -30
  41. data/ext/pg_type_map.c +42 -9
  42. data/ext/pg_type_map_all_strings.c +16 -2
  43. data/ext/pg_type_map_by_class.c +50 -25
  44. data/ext/pg_type_map_by_column.c +68 -30
  45. data/ext/pg_type_map_by_mri_type.c +48 -19
  46. data/ext/pg_type_map_by_oid.c +53 -24
  47. data/ext/pg_type_map_in_ruby.c +51 -20
  48. data/ext/pg_util.c +2 -2
  49. data/lib/pg/basic_type_map_based_on_result.rb +47 -0
  50. data/lib/pg/basic_type_map_for_queries.rb +193 -0
  51. data/lib/pg/basic_type_map_for_results.rb +81 -0
  52. data/lib/pg/basic_type_registry.rb +301 -0
  53. data/lib/pg/coder.rb +1 -1
  54. data/lib/pg/connection.rb +655 -69
  55. data/lib/pg/exceptions.rb +7 -1
  56. data/lib/pg/version.rb +4 -0
  57. data/lib/pg.rb +47 -32
  58. data/misc/openssl-pg-segfault.rb +31 -0
  59. data/misc/postgres/History.txt +9 -0
  60. data/misc/postgres/Manifest.txt +5 -0
  61. data/misc/postgres/README.txt +21 -0
  62. data/misc/postgres/Rakefile +21 -0
  63. data/misc/postgres/lib/postgres.rb +16 -0
  64. data/misc/ruby-pg/History.txt +9 -0
  65. data/misc/ruby-pg/Manifest.txt +5 -0
  66. data/misc/ruby-pg/README.txt +21 -0
  67. data/misc/ruby-pg/Rakefile +21 -0
  68. data/misc/ruby-pg/lib/ruby/pg.rb +16 -0
  69. data/pg.gemspec +32 -0
  70. data/rakelib/task_extension.rb +46 -0
  71. data/sample/array_insert.rb +20 -0
  72. data/sample/async_api.rb +102 -0
  73. data/sample/async_copyto.rb +39 -0
  74. data/sample/async_mixed.rb +56 -0
  75. data/sample/check_conn.rb +21 -0
  76. data/sample/copydata.rb +71 -0
  77. data/sample/copyfrom.rb +81 -0
  78. data/sample/copyto.rb +19 -0
  79. data/sample/cursor.rb +21 -0
  80. data/sample/disk_usage_report.rb +177 -0
  81. data/sample/issue-119.rb +94 -0
  82. data/sample/losample.rb +69 -0
  83. data/sample/minimal-testcase.rb +17 -0
  84. data/sample/notify_wait.rb +72 -0
  85. data/sample/pg_statistics.rb +285 -0
  86. data/sample/replication_monitor.rb +222 -0
  87. data/sample/test_binary_values.rb +33 -0
  88. data/sample/wal_shipper.rb +434 -0
  89. data/sample/warehouse_partitions.rb +311 -0
  90. data.tar.gz.sig +0 -0
  91. metadata +81 -224
  92. metadata.gz.sig +0 -0
  93. data/ChangeLog +0 -0
  94. data/lib/pg/basic_type_mapping.rb +0 -522
  95. data/spec/data/expected_trace.out +0 -26
  96. data/spec/data/random_binary_data +0 -0
  97. data/spec/helpers.rb +0 -380
  98. data/spec/pg/basic_type_mapping_spec.rb +0 -630
  99. data/spec/pg/connection_spec.rb +0 -1949
  100. data/spec/pg/connection_sync_spec.rb +0 -41
  101. data/spec/pg/result_spec.rb +0 -681
  102. data/spec/pg/tuple_spec.rb +0 -333
  103. data/spec/pg/type_map_by_class_spec.rb +0 -138
  104. data/spec/pg/type_map_by_column_spec.rb +0 -226
  105. data/spec/pg/type_map_by_mri_type_spec.rb +0 -136
  106. data/spec/pg/type_map_by_oid_spec.rb +0 -149
  107. data/spec/pg/type_map_in_ruby_spec.rb +0 -164
  108. data/spec/pg/type_map_spec.rb +0 -22
  109. data/spec/pg/type_spec.rb +0 -1123
  110. data/spec/pg_spec.rb +0 -50
@@ -0,0 +1,311 @@
1
+ # -*- ruby -*-
2
+ # vim: set nosta noet ts=4 sw=4:
3
+ #
4
+ # Script to automatically move partitioned tables and their indexes
5
+ # to a separate area on disk.
6
+ #
7
+ # Mahlon E. Smith <mahlon@martini.nu>
8
+ #
9
+ # Example use case:
10
+ #
11
+ # - You've got a heavy insert table, such as syslog data.
12
+ # - This table has a partitioning trigger (or is manually partitioned)
13
+ # by date, to separate incoming stuff from archival/report stuff.
14
+ # - You have a tablespace on cheap or slower disk (maybe even
15
+ # ZFS compressed, or some such!)
16
+ #
17
+ # The only assumption this script makes is that your tables are dated, and
18
+ # the tablespace they're moving into already exists.
19
+ #
20
+ # A full example, using the syslog idea from above, where each child
21
+ # table is date partitioned by a convention of "syslog_YEAR-WEEKOFYEAR":
22
+ #
23
+ # syslog # <--- parent
24
+ # syslog_2012_06 # <--- inherited
25
+ # syslog_2012_07 # <--- inherited
26
+ # syslog_2012_08 # <--- inherited
27
+ # ...
28
+ #
29
+ # You'd run this script like so:
30
+ #
31
+ # ./warehouse_partitions.rb -F syslog_%Y_%U
32
+ #
33
+ # Assuming this was week 12 of the year, tables syslog_2012_06 through
34
+ # syslog_2012_11 would start sequentially migrating into the tablespace
35
+ # called 'warehouse'.
36
+ #
37
+
38
+
39
+ require 'date'
40
+ require 'ostruct'
41
+ require 'optparse'
42
+ require 'pathname'
43
+ require 'etc'
44
+ require 'pg'
45
+
46
+
47
+ ### A tablespace migration class.
48
+ ###
49
+ class PGWarehouse
50
+
51
+ def initialize( opts )
52
+ @opts = opts
53
+ @db = PG.connect(
54
+ :dbname => opts.database,
55
+ :host => opts.host,
56
+ :port => opts.port,
57
+ :user => opts.user,
58
+ :password => opts.pass,
59
+ :sslmode => 'prefer'
60
+ )
61
+ @db.exec "SET search_path TO %s" % [ opts.schema ] if opts.schema
62
+
63
+ @relations = self.relations
64
+ end
65
+
66
+ attr_reader :db
67
+
68
+ ######
69
+ public
70
+ ######
71
+
72
+ ### Perform the tablespace moves.
73
+ ###
74
+ def migrate
75
+ if @relations.empty?
76
+ $stderr.puts 'No tables were found for warehousing.'
77
+ return
78
+ end
79
+
80
+ $stderr.puts "Found %d relation%s to move." % [ relations.length, relations.length == 1 ? '' : 's' ]
81
+ @relations.sort_by{|_,v| v[:name] }.each do |_, val|
82
+ $stderr.print " - Moving table '%s' to '%s'... " % [
83
+ val[:name], @opts.tablespace
84
+ ]
85
+
86
+ if @opts.dryrun
87
+ $stderr.puts '(not really)'
88
+
89
+ else
90
+ age = self.timer do
91
+ db.exec "ALTER TABLE %s SET TABLESPACE %s;" % [
92
+ val[:name], @opts.tablespace
93
+ ]
94
+ end
95
+ puts age
96
+ end
97
+
98
+ val[ :indexes ].each do |idx|
99
+ $stderr.print " - Moving index '%s' to '%s'... " % [
100
+ idx, @opts.tablespace
101
+ ]
102
+ if @opts.dryrun
103
+ $stderr.puts '(not really)'
104
+
105
+ else
106
+ age = self.timer do
107
+ db.exec "ALTER INDEX %s SET TABLESPACE %s;" % [
108
+ idx, @opts.tablespace
109
+ ]
110
+ end
111
+ puts age
112
+ end
113
+ end
114
+ end
115
+ end
116
+
117
+
118
+ #########
119
+ protected
120
+ #########
121
+
122
+ ### Get OIDs and current tablespaces for everything under the
123
+ ### specified schema.
124
+ ###
125
+ def relations
126
+ return @relations if @relations
127
+ relations = {}
128
+
129
+ query = %q{
130
+ SELECT c.oid AS oid,
131
+ c.relname AS name,
132
+ c.relkind AS kind,
133
+ t.spcname AS tspace
134
+ FROM pg_class AS c
135
+ LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
136
+ LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace
137
+ WHERE c.relkind = 'r' }
138
+ query << "AND n.nspname='#{@opts.schema}'" if @opts.schema
139
+
140
+ # Get the relations list, along with each element's current tablespace.
141
+ #
142
+ self.db.exec( query ) do |res|
143
+ res.each do |row|
144
+ relations[ row['oid'] ] = {
145
+ :name => row['name'],
146
+ :tablespace => row['tspace'],
147
+ :indexes => [],
148
+ :parent => nil
149
+ }
150
+ end
151
+ end
152
+
153
+ # Add table inheritance information.
154
+ #
155
+ db.exec 'SELECT inhrelid AS oid, inhparent AS parent FROM pg_inherits' do |res|
156
+ res.each do |row|
157
+ relations[ row['oid'] ][ :parent ] = row['parent']
158
+ end
159
+ end
160
+
161
+ # Remove tables that don't qualify for warehousing.
162
+ #
163
+ # - Tables that are not children of a parent
164
+ # - Tables that are already in the warehouse tablespace
165
+ # - The currently active child (it's likely being written to!)
166
+ # - Any table that can't be parsed into the specified format
167
+ #
168
+ relations.reject! do |oid, val|
169
+ begin
170
+ val[:parent].nil? ||
171
+ val[:tablespace] == @opts.tablespace ||
172
+ val[:name] == Time.now.strftime( @opts.format ) ||
173
+ ! DateTime.strptime( val[:name], @opts.format )
174
+ rescue ArgumentError
175
+ true
176
+ end
177
+ end
178
+
179
+ query = %q{
180
+ SELECT c.oid AS oid,
181
+ i.indexname AS name
182
+ FROM pg_class AS c
183
+ INNER JOIN pg_indexes AS i
184
+ ON i.tablename = c.relname }
185
+ query << "AND i.schemaname='#{@opts.schema}'" if @opts.schema
186
+
187
+ # Attach index names to tables.
188
+ #
189
+ db.exec( query ) do |res|
190
+ res.each do |row|
191
+ relations[ row['oid'] ][ :indexes ] << row['name'] if relations[ row['oid'] ]
192
+ end
193
+ end
194
+
195
+ return relations
196
+ end
197
+
198
+
199
+ ### Wrap arbitrary commands in a human readable timer.
200
+ ###
201
+ def timer
202
+ start = Time.now
203
+ yield
204
+ age = Time.now - start
205
+
206
+ diff = age
207
+ secs = diff % 60
208
+ diff = ( diff - secs ) / 60
209
+ mins = diff % 60
210
+ diff = ( diff - mins ) / 60
211
+ hour = diff % 24
212
+
213
+ return "%02d:%02d:%02d" % [ hour, mins, secs ]
214
+ end
215
+ end
216
+
217
+
218
+ ### Parse command line arguments. Return a struct of global options.
219
+ ###
220
+ def parse_args( args )
221
+ options = OpenStruct.new
222
+ options.database = Etc.getpwuid( Process.uid ).name
223
+ options.host = '127.0.0.1'
224
+ options.port = 5432
225
+ options.user = Etc.getpwuid( Process.uid ).name
226
+ options.sslmode = 'prefer'
227
+ options.tablespace = 'warehouse'
228
+
229
+ opts = OptionParser.new do |opts|
230
+ opts.banner = "Usage: #{$0} [options]"
231
+
232
+ opts.separator ''
233
+ opts.separator 'Connection options:'
234
+
235
+ opts.on( '-d', '--database DBNAME',
236
+ "specify the database to connect to (default: \"#{options.database}\")" ) do |db|
237
+ options.database = db
238
+ end
239
+
240
+ opts.on( '-h', '--host HOSTNAME', 'database server host' ) do |host|
241
+ options.host = host
242
+ end
243
+
244
+ opts.on( '-p', '--port PORT', Integer,
245
+ "database server port (default: \"#{options.port}\")" ) do |port|
246
+ options.port = port
247
+ end
248
+
249
+ opts.on( '-n', '--schema SCHEMA', String,
250
+ "operate on the named schema only (default: none)" ) do |schema|
251
+ options.schema = schema
252
+ end
253
+
254
+ opts.on( '-T', '--tablespace SPACE', String,
255
+ "move old tables to this tablespace (default: \"#{options.tablespace}\")" ) do |tb|
256
+ options.tablespace = tb
257
+ end
258
+
259
+ opts.on( '-F', '--tableformat FORMAT', String,
260
+ "The naming format (strftime) for the inherited tables (default: none)" ) do |format|
261
+ options.format = format
262
+ end
263
+
264
+ opts.on( '-U', '--user NAME',
265
+ "database user name (default: \"#{options.user}\")" ) do |user|
266
+ options.user = user
267
+ end
268
+
269
+ opts.on( '-W', 'force password prompt' ) do |pw|
270
+ print 'Password: '
271
+ begin
272
+ system 'stty -echo'
273
+ options.pass = gets.chomp
274
+ ensure
275
+ system 'stty echo'
276
+ puts
277
+ end
278
+ end
279
+
280
+ opts.separator ''
281
+ opts.separator 'Other options:'
282
+
283
+ opts.on_tail( '--dry-run', "don't actually do anything" ) do
284
+ options.dryrun = true
285
+ end
286
+
287
+ opts.on_tail( '--help', 'show this help, then exit' ) do
288
+ $stderr.puts opts
289
+ exit
290
+ end
291
+
292
+ opts.on_tail( '--version', 'output version information, then exit' ) do
293
+ puts Stats::VERSION
294
+ exit
295
+ end
296
+ end
297
+
298
+ opts.parse!( args )
299
+ return options
300
+ end
301
+
302
+
303
+ if __FILE__ == $0
304
+ opts = parse_args( ARGV )
305
+ raise ArgumentError, "A naming format (-F) is required." unless opts.format
306
+
307
+ $stdout.sync = true
308
+ PGWarehouse.new( opts ).migrate
309
+ end
310
+
311
+
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.2.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -11,220 +11,52 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIID+DCCAmCgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdnZWQv
15
- REM9RmFlcmllTVVEL0RDPW9yZzAeFw0x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AQELBQADggEBAILiaB/unSVBfX5n7uL8
26
+ veGGCOHuGYhCGqspb6mYiCx0dmV3RPRiEfGDLfzcXbHNx/3AjygcxH4Slr+pmaxr
27
+ 04Xli3WurocnjoANSWqCwpHH3OhSVxFgBNrCa3OMWcIr0xKH+I7PXA80SXe0pzfg
28
+ ePjpzTY71j+rcyRJqWiU5/zwdUaCCelBJscxh/0IaNcz67ocCEMRj0n4m5HFEmZL
29
+ 9zKkMZFoOjxRQjcL84QU7ZXnnFR5HG8nLw+NqWjo49W6MBQ9HGFda2tk3OpBhyWS
30
+ sc3NyOkGUGdfiee5VRG31Sh3LLON3YGED+zZAS+ZF6598y4vhv8MBLa1Oy357byC
31
+ tTg=
36
32
  -----END CERTIFICATE-----
37
- date: 2020-03-18 00:00:00.000000000 Z
38
- dependencies:
39
- - !ruby/object:Gem::Dependency
40
- name: hoe-mercurial
41
- requirement: !ruby/object:Gem::Requirement
42
- requirements:
43
- - - "~>"
44
- - !ruby/object:Gem::Version
45
- version: '1.4'
46
- type: :development
47
- prerelease: false
48
- version_requirements: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: '1.4'
53
- - !ruby/object:Gem::Dependency
54
- name: hoe-deveiate
55
- requirement: !ruby/object:Gem::Requirement
56
- requirements:
57
- - - "~>"
58
- - !ruby/object:Gem::Version
59
- version: '0.10'
60
- type: :development
61
- prerelease: false
62
- version_requirements: !ruby/object:Gem::Requirement
63
- requirements:
64
- - - "~>"
65
- - !ruby/object:Gem::Version
66
- version: '0.10'
67
- - !ruby/object:Gem::Dependency
68
- name: hoe-highline
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '0.2'
74
- type: :development
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '0.2'
81
- - !ruby/object:Gem::Dependency
82
- name: rake-compiler
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - "~>"
86
- - !ruby/object:Gem::Version
87
- version: '1.0'
88
- type: :development
89
- prerelease: false
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - "~>"
93
- - !ruby/object:Gem::Version
94
- version: '1.0'
95
- - !ruby/object:Gem::Dependency
96
- name: rake-compiler-dock
97
- requirement: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - "~>"
100
- - !ruby/object:Gem::Version
101
- version: '1.0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- requirements:
106
- - - "~>"
107
- - !ruby/object:Gem::Version
108
- version: '1.0'
109
- - !ruby/object:Gem::Dependency
110
- name: hoe-bundler
111
- requirement: !ruby/object:Gem::Requirement
112
- requirements:
113
- - - "~>"
114
- - !ruby/object:Gem::Version
115
- version: '1.0'
116
- type: :development
117
- prerelease: false
118
- version_requirements: !ruby/object:Gem::Requirement
119
- requirements:
120
- - - "~>"
121
- - !ruby/object:Gem::Version
122
- version: '1.0'
123
- - !ruby/object:Gem::Dependency
124
- name: rspec
125
- requirement: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - "~>"
128
- - !ruby/object:Gem::Version
129
- version: '3.5'
130
- type: :development
131
- prerelease: false
132
- version_requirements: !ruby/object:Gem::Requirement
133
- requirements:
134
- - - "~>"
135
- - !ruby/object:Gem::Version
136
- version: '3.5'
137
- - !ruby/object:Gem::Dependency
138
- name: rdoc
139
- requirement: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: '5.1'
144
- type: :development
145
- prerelease: false
146
- version_requirements: !ruby/object:Gem::Requirement
147
- requirements:
148
- - - "~>"
149
- - !ruby/object:Gem::Version
150
- version: '5.1'
151
- - !ruby/object:Gem::Dependency
152
- name: hoe
153
- requirement: !ruby/object:Gem::Requirement
154
- requirements:
155
- - - "~>"
156
- - !ruby/object:Gem::Version
157
- version: '3.20'
158
- type: :development
159
- prerelease: false
160
- version_requirements: !ruby/object:Gem::Requirement
161
- requirements:
162
- - - "~>"
163
- - !ruby/object:Gem::Version
164
- version: '3.20'
165
- description: |-
166
- Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/].
167
-
168
- It works with {PostgreSQL 9.2 and later}[http://www.postgresql.org/support/versioning/].
169
-
170
- A small example usage:
171
-
172
- #!/usr/bin/env ruby
173
-
174
- require 'pg'
175
-
176
- # Output a table of current connections to the DB
177
- conn = PG.connect( dbname: 'sales' )
178
- conn.exec( "SELECT * FROM pg_stat_activity" ) do |result|
179
- puts " PID | User | Query"
180
- result.each do |row|
181
- puts " %7d | %-16s | %s " %
182
- row.values_at('procpid', 'usename', 'current_query')
183
- end
184
- end
33
+ date: 2022-10-11 00:00:00.000000000 Z
34
+ dependencies: []
35
+ description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL
36
+ 9.3 and later.
185
37
  email:
186
38
  - ged@FaerieMUD.org
187
39
  - lars@greiz-reinsdorf.de
188
40
  executables: []
189
41
  extensions:
190
42
  - ext/extconf.rb
191
- extra_rdoc_files:
192
- - Contributors.rdoc
193
- - History.rdoc
194
- - Manifest.txt
195
- - README-OS_X.rdoc
196
- - README-Windows.rdoc
197
- - README.ja.rdoc
198
- - README.rdoc
199
- - ext/errorcodes.txt
200
- - POSTGRES
201
- - LICENSE
202
- - ext/gvl_wrappers.c
203
- - ext/pg.c
204
- - ext/pg_binary_decoder.c
205
- - ext/pg_binary_encoder.c
206
- - ext/pg_coder.c
207
- - ext/pg_connection.c
208
- - ext/pg_copy_coder.c
209
- - ext/pg_errors.c
210
- - ext/pg_record_coder.c
211
- - ext/pg_result.c
212
- - ext/pg_text_decoder.c
213
- - ext/pg_text_encoder.c
214
- - ext/pg_tuple.c
215
- - ext/pg_type_map.c
216
- - ext/pg_type_map_all_strings.c
217
- - ext/pg_type_map_by_class.c
218
- - ext/pg_type_map_by_column.c
219
- - ext/pg_type_map_by_mri_type.c
220
- - ext/pg_type_map_by_oid.c
221
- - ext/pg_type_map_in_ruby.c
222
- - ext/pg_util.c
43
+ extra_rdoc_files: []
223
44
  files:
45
+ - ".appveyor.yml"
46
+ - ".gems"
224
47
  - ".gemtest"
48
+ - ".github/workflows/binary-gems.yml"
49
+ - ".github/workflows/source-gem.yml"
50
+ - ".gitignore"
51
+ - ".hgsigs"
52
+ - ".hgtags"
53
+ - ".irbrc"
54
+ - ".pryrc"
55
+ - ".tm_properties"
56
+ - ".travis.yml"
225
57
  - BSDL
226
- - ChangeLog
227
58
  - Contributors.rdoc
59
+ - Gemfile
228
60
  - History.rdoc
229
61
  - LICENSE
230
62
  - Manifest.txt
@@ -235,6 +67,8 @@ files:
235
67
  - README.rdoc
236
68
  - Rakefile
237
69
  - Rakefile.cross
70
+ - certs/ged.pem
71
+ - certs/larskanis-2022.pem
238
72
  - ext/errorcodes.def
239
73
  - ext/errorcodes.rb
240
74
  - ext/errorcodes.txt
@@ -267,7 +101,10 @@ files:
267
101
  - ext/vc/pg_18/pg.vcproj
268
102
  - ext/vc/pg_19/pg_19.vcproj
269
103
  - lib/pg.rb
270
- - lib/pg/basic_type_mapping.rb
104
+ - lib/pg/basic_type_map_based_on_result.rb
105
+ - lib/pg/basic_type_map_for_queries.rb
106
+ - lib/pg/basic_type_map_for_results.rb
107
+ - lib/pg/basic_type_registry.rb
271
108
  - lib/pg/binary_decoder.rb
272
109
  - lib/pg/coder.rb
273
110
  - lib/pg/connection.rb
@@ -278,27 +115,47 @@ files:
278
115
  - lib/pg/text_encoder.rb
279
116
  - lib/pg/tuple.rb
280
117
  - lib/pg/type_map_by_column.rb
281
- - spec/data/expected_trace.out
282
- - spec/data/random_binary_data
283
- - spec/helpers.rb
284
- - spec/pg/basic_type_mapping_spec.rb
285
- - spec/pg/connection_spec.rb
286
- - spec/pg/connection_sync_spec.rb
287
- - spec/pg/result_spec.rb
288
- - spec/pg/tuple_spec.rb
289
- - spec/pg/type_map_by_class_spec.rb
290
- - spec/pg/type_map_by_column_spec.rb
291
- - spec/pg/type_map_by_mri_type_spec.rb
292
- - spec/pg/type_map_by_oid_spec.rb
293
- - spec/pg/type_map_in_ruby_spec.rb
294
- - spec/pg/type_map_spec.rb
295
- - spec/pg/type_spec.rb
296
- - spec/pg_spec.rb
118
+ - lib/pg/version.rb
119
+ - misc/openssl-pg-segfault.rb
120
+ - misc/postgres/History.txt
121
+ - misc/postgres/Manifest.txt
122
+ - misc/postgres/README.txt
123
+ - misc/postgres/Rakefile
124
+ - misc/postgres/lib/postgres.rb
125
+ - misc/ruby-pg/History.txt
126
+ - misc/ruby-pg/Manifest.txt
127
+ - misc/ruby-pg/README.txt
128
+ - misc/ruby-pg/Rakefile
129
+ - misc/ruby-pg/lib/ruby/pg.rb
130
+ - pg.gemspec
131
+ - rakelib/task_extension.rb
132
+ - sample/array_insert.rb
133
+ - sample/async_api.rb
134
+ - sample/async_copyto.rb
135
+ - sample/async_mixed.rb
136
+ - sample/check_conn.rb
137
+ - sample/copydata.rb
138
+ - sample/copyfrom.rb
139
+ - sample/copyto.rb
140
+ - sample/cursor.rb
141
+ - sample/disk_usage_report.rb
142
+ - sample/issue-119.rb
143
+ - sample/losample.rb
144
+ - sample/minimal-testcase.rb
145
+ - sample/notify_wait.rb
146
+ - sample/pg_statistics.rb
147
+ - sample/replication_monitor.rb
148
+ - sample/test_binary_values.rb
149
+ - sample/wal_shipper.rb
150
+ - sample/warehouse_partitions.rb
297
151
  homepage: https://github.com/ged/ruby-pg
298
152
  licenses:
299
153
  - BSD-2-Clause
300
154
  metadata:
301
155
  homepage_uri: https://github.com/ged/ruby-pg
156
+ source_code_uri: https://github.com/ged/ruby-pg
157
+ changelog_uri: https://github.com/ged/ruby-pg/blob/master/History.rdoc
158
+ documentation_uri: http://deveiate.org/code/pg
302
159
  post_install_message:
303
160
  rdoc_options:
304
161
  - "--main"
@@ -309,15 +166,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
166
  requirements:
310
167
  - - ">="
311
168
  - !ruby/object:Gem::Version
312
- version: '2.2'
169
+ version: '2.5'
313
170
  required_rubygems_version: !ruby/object:Gem::Requirement
314
171
  requirements:
315
172
  - - ">="
316
173
  - !ruby/object:Gem::Version
317
174
  version: '0'
318
175
  requirements: []
319
- rubygems_version: 3.0.6
176
+ rubygems_version: 3.3.19
320
177
  signing_key:
321
178
  specification_version: 4
322
- summary: Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
179
+ summary: Pg is the Ruby interface to the PostgreSQL RDBMS
323
180
  test_files: []
metadata.gz.sig CHANGED
Binary file
data/ChangeLog DELETED
File without changes