pg 0.15.1 → 1.2.3
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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/BSDL +2 -2
- data/ChangeLog +0 -3022
- data/History.rdoc +370 -4
- data/Manifest.txt +39 -19
- data/README-Windows.rdoc +17 -28
- data/README.ja.rdoc +1 -2
- data/README.rdoc +113 -14
- data/Rakefile +97 -36
- data/Rakefile.cross +109 -83
- data/ext/errorcodes.def +1032 -0
- data/ext/errorcodes.rb +45 -0
- data/ext/errorcodes.txt +494 -0
- data/ext/extconf.rb +55 -52
- data/ext/gvl_wrappers.c +4 -0
- data/ext/gvl_wrappers.h +94 -38
- data/ext/pg.c +273 -121
- data/ext/pg.h +292 -50
- data/ext/pg_binary_decoder.c +229 -0
- data/ext/pg_binary_encoder.c +163 -0
- data/ext/pg_coder.c +561 -0
- data/ext/pg_connection.c +1811 -1051
- data/ext/pg_copy_coder.c +599 -0
- data/ext/pg_errors.c +95 -0
- data/ext/pg_record_coder.c +491 -0
- data/ext/pg_result.c +917 -203
- data/ext/pg_text_decoder.c +987 -0
- data/ext/pg_text_encoder.c +814 -0
- data/ext/pg_tuple.c +549 -0
- data/ext/pg_type_map.c +166 -0
- data/ext/pg_type_map_all_strings.c +116 -0
- data/ext/pg_type_map_by_class.c +244 -0
- data/ext/pg_type_map_by_column.c +313 -0
- data/ext/pg_type_map_by_mri_type.c +284 -0
- data/ext/pg_type_map_by_oid.c +356 -0
- data/ext/pg_type_map_in_ruby.c +299 -0
- data/ext/pg_util.c +149 -0
- data/ext/pg_util.h +65 -0
- data/lib/pg.rb +31 -9
- data/lib/pg/basic_type_mapping.rb +522 -0
- data/lib/pg/binary_decoder.rb +23 -0
- data/lib/pg/coder.rb +104 -0
- data/lib/pg/connection.rb +235 -30
- data/lib/pg/constants.rb +2 -1
- data/lib/pg/exceptions.rb +2 -1
- data/lib/pg/result.rb +33 -6
- data/lib/pg/text_decoder.rb +46 -0
- data/lib/pg/text_encoder.rb +59 -0
- data/lib/pg/tuple.rb +30 -0
- data/lib/pg/type_map_by_column.rb +16 -0
- data/spec/{lib/helpers.rb → helpers.rb} +154 -52
- data/spec/pg/basic_type_mapping_spec.rb +630 -0
- data/spec/pg/connection_spec.rb +1352 -426
- data/spec/pg/connection_sync_spec.rb +41 -0
- data/spec/pg/result_spec.rb +508 -105
- data/spec/pg/tuple_spec.rb +333 -0
- data/spec/pg/type_map_by_class_spec.rb +138 -0
- data/spec/pg/type_map_by_column_spec.rb +226 -0
- data/spec/pg/type_map_by_mri_type_spec.rb +136 -0
- data/spec/pg/type_map_by_oid_spec.rb +149 -0
- data/spec/pg/type_map_in_ruby_spec.rb +164 -0
- data/spec/pg/type_map_spec.rb +22 -0
- data/spec/pg/type_spec.rb +1123 -0
- data/spec/pg_spec.rb +35 -16
- metadata +163 -84
- metadata.gz.sig +0 -0
- data/sample/array_insert.rb +0 -20
- data/sample/async_api.rb +0 -106
- data/sample/async_copyto.rb +0 -39
- data/sample/async_mixed.rb +0 -56
- data/sample/check_conn.rb +0 -21
- data/sample/copyfrom.rb +0 -81
- data/sample/copyto.rb +0 -19
- data/sample/cursor.rb +0 -21
- data/sample/disk_usage_report.rb +0 -186
- data/sample/issue-119.rb +0 -94
- data/sample/losample.rb +0 -69
- data/sample/minimal-testcase.rb +0 -17
- data/sample/notify_wait.rb +0 -72
- data/sample/pg_statistics.rb +0 -294
- data/sample/replication_monitor.rb +0 -231
- data/sample/test_binary_values.rb +0 -33
- data/sample/wal_shipper.rb +0 -434
- data/sample/warehouse_partitions.rb +0 -320
data/Rakefile.cross
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# -*- rake -*-
|
2
2
|
|
3
3
|
require 'uri'
|
4
4
|
require 'tempfile'
|
@@ -21,19 +21,32 @@ end
|
|
21
21
|
class CrossLibrary < OpenStruct
|
22
22
|
include Rake::DSL
|
23
23
|
|
24
|
-
def initialize(for_platform, openssl_config)
|
24
|
+
def initialize(for_platform, openssl_config, toolchain)
|
25
25
|
super()
|
26
26
|
|
27
27
|
self.for_platform = for_platform
|
28
28
|
self.openssl_config = openssl_config
|
29
|
+
self.host_platform = toolchain
|
29
30
|
|
30
31
|
# Cross-compilation constants
|
31
|
-
self.openssl_version = ENV['OPENSSL_VERSION'] || '1.
|
32
|
-
self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '
|
33
|
-
|
34
|
-
|
32
|
+
self.openssl_version = ENV['OPENSSL_VERSION'] || '1.1.1d'
|
33
|
+
self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '12.1'
|
34
|
+
|
35
|
+
# Check if symlinks work in the current working directory.
|
36
|
+
# This fails, if rake-compiler-dock is running on a Windows box.
|
37
|
+
begin
|
38
|
+
FileUtils.rm_f '.test_symlink'
|
39
|
+
FileUtils.ln_s '/', '.test_symlink'
|
40
|
+
rescue NotImplementedError, SystemCallError
|
41
|
+
# Symlinks don't work -> use home directory instead
|
42
|
+
self.compile_home = Pathname( "~/.ruby-pg-build" ).expand_path
|
43
|
+
else
|
44
|
+
self.compile_home = Pathname( "./build" ).expand_path
|
45
|
+
end
|
35
46
|
self.static_sourcesdir = compile_home + 'sources'
|
36
47
|
self.static_builddir = compile_home + 'builds' + for_platform
|
48
|
+
CLOBBER.include( static_sourcesdir )
|
49
|
+
CLEAN.include( static_builddir )
|
37
50
|
|
38
51
|
# Static OpenSSL build vars
|
39
52
|
self.static_openssl_builddir = static_builddir + "openssl-#{openssl_version}"
|
@@ -43,8 +56,8 @@ class CrossLibrary < OpenStruct
|
|
43
56
|
self.openssl_tarball = static_sourcesdir + File.basename( openssl_source_uri.path )
|
44
57
|
self.openssl_makefile = static_openssl_builddir + 'Makefile'
|
45
58
|
|
46
|
-
self.
|
47
|
-
self.
|
59
|
+
self.libssl = static_openssl_builddir + 'libssl.a'
|
60
|
+
self.libcrypto = static_openssl_builddir + 'libcrypto.a'
|
48
61
|
|
49
62
|
self.openssl_patches = Rake::FileList[ (MISCDIR + "openssl-#{openssl_version}.*.patch").to_s ]
|
50
63
|
|
@@ -64,36 +77,12 @@ class CrossLibrary < OpenStruct
|
|
64
77
|
self.postgresql_global_makefile = static_postgresql_srcdir + 'Makefile.global'
|
65
78
|
self.postgresql_shlib_makefile = static_postgresql_srcdir + 'Makefile.shlib'
|
66
79
|
self.postgresql_shlib_mf_orig = static_postgresql_srcdir + 'Makefile.shlib.orig'
|
67
|
-
self.postgresql_lib = static_postgresql_libdir + 'libpq.
|
80
|
+
self.postgresql_lib = static_postgresql_libdir + 'libpq.dll'
|
68
81
|
self.postgresql_patches = Rake::FileList[ (MISCDIR + "postgresql-#{postgresql_version}.*.patch").to_s ]
|
69
82
|
|
70
|
-
# Use rake-compilers config.yml to determine the toolchain that was used
|
71
|
-
# to build Ruby for this platform.
|
72
|
-
self.host_platform = begin
|
73
|
-
config_file = YAML.load_file(File.expand_path("~/.rake-compiler/config.yml"))
|
74
|
-
_, rbfile = config_file.find{|key, fname| key.start_with?("rbconfig-#{for_platform}-") }
|
75
|
-
IO.read(rbfile).match(/CONFIG\["host"\] = "(.*)"/)[1]
|
76
|
-
rescue
|
77
|
-
nil
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
83
|
# clean intermediate files and folders
|
82
84
|
CLEAN.include( static_builddir.to_s )
|
83
85
|
|
84
|
-
|
85
|
-
ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.3:2.0.0'
|
86
|
-
|
87
|
-
def download(url, save_to)
|
88
|
-
part = save_to+".part"
|
89
|
-
sh "wget #{url.to_s.inspect} -O #{part.inspect} || curl #{url.to_s.inspect} -o #{part.inspect}"
|
90
|
-
FileUtils.mv part, save_to
|
91
|
-
end
|
92
|
-
|
93
|
-
def run(*args)
|
94
|
-
sh *args
|
95
|
-
end
|
96
|
-
|
97
86
|
#####################################################################
|
98
87
|
### C R O S S - C O M P I L A T I O N - T A S K S
|
99
88
|
#####################################################################
|
@@ -126,17 +115,15 @@ class CrossLibrary < OpenStruct
|
|
126
115
|
end
|
127
116
|
|
128
117
|
self.cmd_prelude = [
|
129
|
-
|
130
|
-
"
|
118
|
+
"env",
|
119
|
+
"CROSS_COMPILE=#{host_platform}-",
|
131
120
|
"CFLAGS=-DDSO_WIN32",
|
132
|
-
"AR=#{host_platform}-ar",
|
133
|
-
"RANLIB=#{host_platform}-ranlib"
|
134
121
|
]
|
135
122
|
|
136
123
|
|
137
124
|
# generate the makefile in a clean build location
|
138
125
|
file openssl_makefile => static_openssl_builddir do |t|
|
139
|
-
|
126
|
+
chdir( static_openssl_builddir ) do
|
140
127
|
cmd = cmd_prelude.dup
|
141
128
|
cmd << "./Configure" << openssl_config
|
142
129
|
|
@@ -145,10 +132,10 @@ class CrossLibrary < OpenStruct
|
|
145
132
|
end
|
146
133
|
|
147
134
|
desc "compile static openssl libraries"
|
148
|
-
task
|
135
|
+
task "openssl_libs:#{for_platform}" => [ libssl, libcrypto ]
|
149
136
|
|
150
|
-
task
|
151
|
-
|
137
|
+
task "compile_static_openssl:#{for_platform}" => openssl_makefile do |t|
|
138
|
+
chdir( static_openssl_builddir ) do
|
152
139
|
cmd = cmd_prelude.dup
|
153
140
|
cmd << 'make' << "-j#{NUM_CPUS}" << 'build_libs'
|
154
141
|
|
@@ -156,14 +143,14 @@ class CrossLibrary < OpenStruct
|
|
156
143
|
end
|
157
144
|
end
|
158
145
|
|
159
|
-
desc "compile static #{
|
160
|
-
file
|
161
|
-
|
146
|
+
desc "compile static #{libssl}"
|
147
|
+
file libssl => "compile_static_openssl:#{for_platform}" do |t|
|
148
|
+
rm t.name.gsub(/\.a$/, ".dll.a")
|
162
149
|
end
|
163
150
|
|
164
|
-
desc "compile static #{
|
165
|
-
file
|
166
|
-
|
151
|
+
desc "compile static #{libcrypto}"
|
152
|
+
file libcrypto => "compile_static_openssl:#{for_platform}" do |t|
|
153
|
+
rm t.name.gsub(/\.a$/, ".dll.a")
|
167
154
|
end
|
168
155
|
|
169
156
|
|
@@ -184,7 +171,6 @@ class CrossLibrary < OpenStruct
|
|
184
171
|
puts "extracting %s to %s" % [ postgresql_tarball, static_postgresql_builddir.parent ]
|
185
172
|
static_postgresql_builddir.mkpath
|
186
173
|
run 'tar', '-xjf', postgresql_tarball.to_s, '-C', static_postgresql_builddir.parent.to_s
|
187
|
-
mv postgresql_shlib_makefile, postgresql_shlib_mf_orig
|
188
174
|
|
189
175
|
postgresql_patches.each do |patchfile|
|
190
176
|
puts " applying patch #{patchfile}..."
|
@@ -194,22 +180,21 @@ class CrossLibrary < OpenStruct
|
|
194
180
|
end
|
195
181
|
|
196
182
|
# generate the makefile in a clean build location
|
197
|
-
file postgresql_global_makefile => [ static_postgresql_builddir,
|
183
|
+
file postgresql_global_makefile => [ static_postgresql_builddir, "openssl_libs:#{for_platform}" ] do |t|
|
198
184
|
options = [
|
199
185
|
"--target=#{host_platform}",
|
200
186
|
"--host=#{host_platform}",
|
201
187
|
'--with-openssl',
|
202
188
|
'--without-zlib',
|
203
|
-
'--disable-shared',
|
204
189
|
]
|
205
190
|
|
206
|
-
|
191
|
+
chdir( static_postgresql_builddir ) do
|
207
192
|
configure_path = static_postgresql_builddir + 'configure'
|
208
193
|
cmd = [ configure_path.to_s, *options ]
|
209
194
|
cmd << "CFLAGS=-L#{static_openssl_builddir}"
|
210
195
|
cmd << "LDFLAGS=-L#{static_openssl_builddir}"
|
211
196
|
cmd << "LDFLAGS_SL=-L#{static_openssl_builddir}"
|
212
|
-
cmd << "LIBS=-lwsock32 -lgdi32"
|
197
|
+
cmd << "LIBS=-lwsock32 -lgdi32 -lws2_32"
|
213
198
|
cmd << "CPPFLAGS=-I#{static_openssl_builddir}/include"
|
214
199
|
|
215
200
|
run( *cmd )
|
@@ -217,51 +202,62 @@ class CrossLibrary < OpenStruct
|
|
217
202
|
end
|
218
203
|
|
219
204
|
|
220
|
-
#
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
205
|
+
# make libpq.dll
|
206
|
+
task postgresql_lib => [ postgresql_global_makefile ] do |t|
|
207
|
+
# Work around missing dependency to libcommon in PostgreSQL-9.4.0
|
208
|
+
chdir( static_postgresql_srcdir + "common" ) do
|
209
|
+
sh 'make', "-j#{NUM_CPUS}"
|
210
|
+
end
|
211
|
+
chdir( static_postgresql_srcdir + "port" ) do
|
212
|
+
sh 'make', "-j#{NUM_CPUS}"
|
228
213
|
end
|
229
|
-
tf.close
|
230
214
|
|
231
|
-
|
215
|
+
chdir( postgresql_lib.dirname ) do
|
216
|
+
sh 'make',
|
217
|
+
"-j#{NUM_CPUS}",
|
218
|
+
postgresql_lib.basename.to_s,
|
219
|
+
'SHLIB_LINK=-lssl -lcrypto -lcrypt32 -lgdi32 -lsecur32 -lwsock32 -lws2_32'
|
220
|
+
end
|
232
221
|
end
|
233
222
|
|
234
223
|
|
235
|
-
#
|
236
|
-
task
|
237
|
-
|
238
|
-
|
239
|
-
|
224
|
+
#desc 'compile libpg.a'
|
225
|
+
task "native:#{for_platform}" => postgresql_lib
|
226
|
+
|
227
|
+
# copy libpq.dll to lib dir
|
228
|
+
dest_libpq = "lib/#{for_platform}/#{postgresql_lib.basename}"
|
229
|
+
directory File.dirname(dest_libpq)
|
230
|
+
file dest_libpq => [postgresql_lib, File.dirname(dest_libpq)] do
|
231
|
+
cp postgresql_lib, dest_libpq
|
240
232
|
end
|
241
233
|
|
234
|
+
stage_libpq = "tmp/#{for_platform}/stage/#{dest_libpq}"
|
235
|
+
directory File.dirname(stage_libpq)
|
236
|
+
file stage_libpq => [postgresql_lib, File.dirname(stage_libpq)] do |t|
|
237
|
+
cp postgresql_lib, stage_libpq
|
238
|
+
end
|
239
|
+
end
|
242
240
|
|
243
|
-
|
244
|
-
|
241
|
+
def download(url, save_to)
|
242
|
+
part = save_to+".part"
|
243
|
+
sh "wget #{url.to_s.inspect} -O #{part.inspect} || curl #{url.to_s.inspect} -o #{part.inspect}"
|
244
|
+
FileUtils.mv part, save_to
|
245
245
|
end
|
246
|
-
end
|
247
246
|
|
248
|
-
|
249
|
-
|
250
|
-
['i386-mingw32', 'mingw'],
|
251
|
-
['x64-mingw32', 'mingw64'],
|
252
|
-
].map do |platform, openssl_config|
|
253
|
-
CrossLibrary.new platform, openssl_config
|
247
|
+
def run(*args)
|
248
|
+
sh(*args)
|
254
249
|
end
|
255
|
-
else
|
256
|
-
$stderr.puts "Cross-compilation disabled -- rake-compiler not properly installed"
|
257
|
-
CrossLibraries = []
|
258
250
|
end
|
259
251
|
|
260
|
-
|
261
|
-
|
262
|
-
|
252
|
+
CrossLibraries = [
|
253
|
+
['x86-mingw32', 'mingw', 'i686-w64-mingw32'],
|
254
|
+
['x64-mingw32', 'mingw64', 'x86_64-w64-mingw32'],
|
255
|
+
].map do |platform, openssl_config, toolchain|
|
256
|
+
CrossLibrary.new platform, openssl_config, toolchain
|
263
257
|
end
|
264
|
-
|
258
|
+
|
259
|
+
desc 'cross compile pg for win32'
|
260
|
+
task :cross => [ :mingw32 ]
|
265
261
|
|
266
262
|
task :mingw32 do
|
267
263
|
# Use Rake::ExtensionCompiler helpers to find the proper host
|
@@ -271,3 +267,33 @@ task :mingw32 do
|
|
271
267
|
fail
|
272
268
|
end
|
273
269
|
end
|
270
|
+
|
271
|
+
task 'gem:windows:prepare' do
|
272
|
+
require 'io/console'
|
273
|
+
require 'rake_compiler_dock'
|
274
|
+
|
275
|
+
# Copy gem signing key and certs to be accessable from the docker container
|
276
|
+
mkdir_p 'build/gem'
|
277
|
+
sh "cp ~/.gem/gem-*.pem build/gem/ || true"
|
278
|
+
sh "bundle package"
|
279
|
+
begin
|
280
|
+
OpenSSL::PKey.read(File.read(File.expand_path("~/.gem/gem-private_key.pem")), ENV["GEM_PRIVATE_KEY_PASSPHRASE"] || "")
|
281
|
+
rescue OpenSSL::PKey::PKeyError
|
282
|
+
ENV["GEM_PRIVATE_KEY_PASSPHRASE"] = STDIN.getpass("Enter passphrase of gem signature key: ")
|
283
|
+
retry
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
CrossLibraries.each do |xlib|
|
288
|
+
platform = xlib.for_platform
|
289
|
+
desc "Build fat binary gem for platform #{platform}"
|
290
|
+
task "gem:windows:#{platform}" => ['ChangeLog', 'gem:windows:prepare', xlib.openssl_tarball, xlib.postgresql_tarball] do
|
291
|
+
RakeCompilerDock.sh <<-EOT, platform: platform
|
292
|
+
(cp build/gem/gem-*.pem ~/.gem/ || true) &&
|
293
|
+
bundle install --local &&
|
294
|
+
rake native:#{platform} pkg/#{$hoespec.spec.full_name}-#{platform}.gem MAKE="make -j`nproc`"
|
295
|
+
EOT
|
296
|
+
end
|
297
|
+
desc "Build the windows binary gems"
|
298
|
+
multitask 'gem:windows' => "gem:windows:#{platform}"
|
299
|
+
end
|
data/ext/errorcodes.def
ADDED
@@ -0,0 +1,1032 @@
|
|
1
|
+
/*
|
2
|
+
* ext/errorcodes.def - Definition of error classes.
|
3
|
+
*
|
4
|
+
* WARNING: This file is autogenerated. Please edit ext/errorcodes.rb !
|
5
|
+
*
|
6
|
+
*/
|
7
|
+
|
8
|
+
|
9
|
+
{
|
10
|
+
VALUE klass = define_error_class( "SqlStatementNotYetComplete", NULL );
|
11
|
+
register_error_class( "03000", klass );
|
12
|
+
register_error_class( "03", klass );
|
13
|
+
}
|
14
|
+
{
|
15
|
+
VALUE klass = define_error_class( "ConnectionException", NULL );
|
16
|
+
register_error_class( "08000", klass );
|
17
|
+
register_error_class( "08", klass );
|
18
|
+
}
|
19
|
+
{
|
20
|
+
VALUE klass = define_error_class( "ConnectionDoesNotExist", "08" );
|
21
|
+
register_error_class( "08003", klass );
|
22
|
+
}
|
23
|
+
{
|
24
|
+
VALUE klass = define_error_class( "ConnectionFailure", "08" );
|
25
|
+
register_error_class( "08006", klass );
|
26
|
+
}
|
27
|
+
{
|
28
|
+
VALUE klass = define_error_class( "SqlclientUnableToEstablishSqlconnection", "08" );
|
29
|
+
register_error_class( "08001", klass );
|
30
|
+
}
|
31
|
+
{
|
32
|
+
VALUE klass = define_error_class( "SqlserverRejectedEstablishmentOfSqlconnection", "08" );
|
33
|
+
register_error_class( "08004", klass );
|
34
|
+
}
|
35
|
+
{
|
36
|
+
VALUE klass = define_error_class( "TransactionResolutionUnknown", "08" );
|
37
|
+
register_error_class( "08007", klass );
|
38
|
+
}
|
39
|
+
{
|
40
|
+
VALUE klass = define_error_class( "ProtocolViolation", "08" );
|
41
|
+
register_error_class( "08P01", klass );
|
42
|
+
}
|
43
|
+
{
|
44
|
+
VALUE klass = define_error_class( "TriggeredActionException", NULL );
|
45
|
+
register_error_class( "09000", klass );
|
46
|
+
register_error_class( "09", klass );
|
47
|
+
}
|
48
|
+
{
|
49
|
+
VALUE klass = define_error_class( "FeatureNotSupported", NULL );
|
50
|
+
register_error_class( "0A000", klass );
|
51
|
+
register_error_class( "0A", klass );
|
52
|
+
}
|
53
|
+
{
|
54
|
+
VALUE klass = define_error_class( "InvalidTransactionInitiation", NULL );
|
55
|
+
register_error_class( "0B000", klass );
|
56
|
+
register_error_class( "0B", klass );
|
57
|
+
}
|
58
|
+
{
|
59
|
+
VALUE klass = define_error_class( "LocatorException", NULL );
|
60
|
+
register_error_class( "0F000", klass );
|
61
|
+
register_error_class( "0F", klass );
|
62
|
+
}
|
63
|
+
{
|
64
|
+
VALUE klass = define_error_class( "LEInvalidSpecification", "0F" );
|
65
|
+
register_error_class( "0F001", klass );
|
66
|
+
}
|
67
|
+
{
|
68
|
+
VALUE klass = define_error_class( "InvalidGrantor", NULL );
|
69
|
+
register_error_class( "0L000", klass );
|
70
|
+
register_error_class( "0L", klass );
|
71
|
+
}
|
72
|
+
{
|
73
|
+
VALUE klass = define_error_class( "InvalidGrantOperation", "0L" );
|
74
|
+
register_error_class( "0LP01", klass );
|
75
|
+
}
|
76
|
+
{
|
77
|
+
VALUE klass = define_error_class( "InvalidRoleSpecification", NULL );
|
78
|
+
register_error_class( "0P000", klass );
|
79
|
+
register_error_class( "0P", klass );
|
80
|
+
}
|
81
|
+
{
|
82
|
+
VALUE klass = define_error_class( "DiagnosticsException", NULL );
|
83
|
+
register_error_class( "0Z000", klass );
|
84
|
+
register_error_class( "0Z", klass );
|
85
|
+
}
|
86
|
+
{
|
87
|
+
VALUE klass = define_error_class( "StackedDiagnosticsAccessedWithoutActiveHandler", "0Z" );
|
88
|
+
register_error_class( "0Z002", klass );
|
89
|
+
}
|
90
|
+
{
|
91
|
+
VALUE klass = define_error_class( "CaseNotFound", NULL );
|
92
|
+
register_error_class( "20000", klass );
|
93
|
+
register_error_class( "20", klass );
|
94
|
+
}
|
95
|
+
{
|
96
|
+
VALUE klass = define_error_class( "CardinalityViolation", NULL );
|
97
|
+
register_error_class( "21000", klass );
|
98
|
+
register_error_class( "21", klass );
|
99
|
+
}
|
100
|
+
{
|
101
|
+
VALUE klass = define_error_class( "DataException", NULL );
|
102
|
+
register_error_class( "22000", klass );
|
103
|
+
register_error_class( "22", klass );
|
104
|
+
}
|
105
|
+
{
|
106
|
+
VALUE klass = define_error_class( "ArraySubscriptError", "22" );
|
107
|
+
register_error_class( "2202E", klass );
|
108
|
+
}
|
109
|
+
{
|
110
|
+
VALUE klass = define_error_class( "CharacterNotInRepertoire", "22" );
|
111
|
+
register_error_class( "22021", klass );
|
112
|
+
}
|
113
|
+
{
|
114
|
+
VALUE klass = define_error_class( "DatetimeFieldOverflow", "22" );
|
115
|
+
register_error_class( "22008", klass );
|
116
|
+
}
|
117
|
+
{
|
118
|
+
VALUE klass = define_error_class( "DivisionByZero", "22" );
|
119
|
+
register_error_class( "22012", klass );
|
120
|
+
}
|
121
|
+
{
|
122
|
+
VALUE klass = define_error_class( "ErrorInAssignment", "22" );
|
123
|
+
register_error_class( "22005", klass );
|
124
|
+
}
|
125
|
+
{
|
126
|
+
VALUE klass = define_error_class( "EscapeCharacterConflict", "22" );
|
127
|
+
register_error_class( "2200B", klass );
|
128
|
+
}
|
129
|
+
{
|
130
|
+
VALUE klass = define_error_class( "IndicatorOverflow", "22" );
|
131
|
+
register_error_class( "22022", klass );
|
132
|
+
}
|
133
|
+
{
|
134
|
+
VALUE klass = define_error_class( "IntervalFieldOverflow", "22" );
|
135
|
+
register_error_class( "22015", klass );
|
136
|
+
}
|
137
|
+
{
|
138
|
+
VALUE klass = define_error_class( "InvalidArgumentForLog", "22" );
|
139
|
+
register_error_class( "2201E", klass );
|
140
|
+
}
|
141
|
+
{
|
142
|
+
VALUE klass = define_error_class( "InvalidArgumentForNtile", "22" );
|
143
|
+
register_error_class( "22014", klass );
|
144
|
+
}
|
145
|
+
{
|
146
|
+
VALUE klass = define_error_class( "InvalidArgumentForNthValue", "22" );
|
147
|
+
register_error_class( "22016", klass );
|
148
|
+
}
|
149
|
+
{
|
150
|
+
VALUE klass = define_error_class( "InvalidArgumentForPowerFunction", "22" );
|
151
|
+
register_error_class( "2201F", klass );
|
152
|
+
}
|
153
|
+
{
|
154
|
+
VALUE klass = define_error_class( "InvalidArgumentForWidthBucketFunction", "22" );
|
155
|
+
register_error_class( "2201G", klass );
|
156
|
+
}
|
157
|
+
{
|
158
|
+
VALUE klass = define_error_class( "InvalidCharacterValueForCast", "22" );
|
159
|
+
register_error_class( "22018", klass );
|
160
|
+
}
|
161
|
+
{
|
162
|
+
VALUE klass = define_error_class( "InvalidDatetimeFormat", "22" );
|
163
|
+
register_error_class( "22007", klass );
|
164
|
+
}
|
165
|
+
{
|
166
|
+
VALUE klass = define_error_class( "InvalidEscapeCharacter", "22" );
|
167
|
+
register_error_class( "22019", klass );
|
168
|
+
}
|
169
|
+
{
|
170
|
+
VALUE klass = define_error_class( "InvalidEscapeOctet", "22" );
|
171
|
+
register_error_class( "2200D", klass );
|
172
|
+
}
|
173
|
+
{
|
174
|
+
VALUE klass = define_error_class( "InvalidEscapeSequence", "22" );
|
175
|
+
register_error_class( "22025", klass );
|
176
|
+
}
|
177
|
+
{
|
178
|
+
VALUE klass = define_error_class( "NonstandardUseOfEscapeCharacter", "22" );
|
179
|
+
register_error_class( "22P06", klass );
|
180
|
+
}
|
181
|
+
{
|
182
|
+
VALUE klass = define_error_class( "InvalidIndicatorParameterValue", "22" );
|
183
|
+
register_error_class( "22010", klass );
|
184
|
+
}
|
185
|
+
{
|
186
|
+
VALUE klass = define_error_class( "InvalidParameterValue", "22" );
|
187
|
+
register_error_class( "22023", klass );
|
188
|
+
}
|
189
|
+
{
|
190
|
+
VALUE klass = define_error_class( "InvalidPrecedingOrFollowingSize", "22" );
|
191
|
+
register_error_class( "22013", klass );
|
192
|
+
}
|
193
|
+
{
|
194
|
+
VALUE klass = define_error_class( "InvalidRegularExpression", "22" );
|
195
|
+
register_error_class( "2201B", klass );
|
196
|
+
}
|
197
|
+
{
|
198
|
+
VALUE klass = define_error_class( "InvalidRowCountInLimitClause", "22" );
|
199
|
+
register_error_class( "2201W", klass );
|
200
|
+
}
|
201
|
+
{
|
202
|
+
VALUE klass = define_error_class( "InvalidRowCountInResultOffsetClause", "22" );
|
203
|
+
register_error_class( "2201X", klass );
|
204
|
+
}
|
205
|
+
{
|
206
|
+
VALUE klass = define_error_class( "InvalidTablesampleArgument", "22" );
|
207
|
+
register_error_class( "2202H", klass );
|
208
|
+
}
|
209
|
+
{
|
210
|
+
VALUE klass = define_error_class( "InvalidTablesampleRepeat", "22" );
|
211
|
+
register_error_class( "2202G", klass );
|
212
|
+
}
|
213
|
+
{
|
214
|
+
VALUE klass = define_error_class( "InvalidTimeZoneDisplacementValue", "22" );
|
215
|
+
register_error_class( "22009", klass );
|
216
|
+
}
|
217
|
+
{
|
218
|
+
VALUE klass = define_error_class( "InvalidUseOfEscapeCharacter", "22" );
|
219
|
+
register_error_class( "2200C", klass );
|
220
|
+
}
|
221
|
+
{
|
222
|
+
VALUE klass = define_error_class( "MostSpecificTypeMismatch", "22" );
|
223
|
+
register_error_class( "2200G", klass );
|
224
|
+
}
|
225
|
+
{
|
226
|
+
VALUE klass = define_error_class( "NullValueNotAllowed", "22" );
|
227
|
+
register_error_class( "22004", klass );
|
228
|
+
}
|
229
|
+
{
|
230
|
+
VALUE klass = define_error_class( "NullValueNoIndicatorParameter", "22" );
|
231
|
+
register_error_class( "22002", klass );
|
232
|
+
}
|
233
|
+
{
|
234
|
+
VALUE klass = define_error_class( "NumericValueOutOfRange", "22" );
|
235
|
+
register_error_class( "22003", klass );
|
236
|
+
}
|
237
|
+
{
|
238
|
+
VALUE klass = define_error_class( "SequenceGeneratorLimitExceeded", "22" );
|
239
|
+
register_error_class( "2200H", klass );
|
240
|
+
}
|
241
|
+
{
|
242
|
+
VALUE klass = define_error_class( "StringDataLengthMismatch", "22" );
|
243
|
+
register_error_class( "22026", klass );
|
244
|
+
}
|
245
|
+
{
|
246
|
+
VALUE klass = define_error_class( "StringDataRightTruncation", "22" );
|
247
|
+
register_error_class( "22001", klass );
|
248
|
+
}
|
249
|
+
{
|
250
|
+
VALUE klass = define_error_class( "SubstringError", "22" );
|
251
|
+
register_error_class( "22011", klass );
|
252
|
+
}
|
253
|
+
{
|
254
|
+
VALUE klass = define_error_class( "TrimError", "22" );
|
255
|
+
register_error_class( "22027", klass );
|
256
|
+
}
|
257
|
+
{
|
258
|
+
VALUE klass = define_error_class( "UnterminatedCString", "22" );
|
259
|
+
register_error_class( "22024", klass );
|
260
|
+
}
|
261
|
+
{
|
262
|
+
VALUE klass = define_error_class( "ZeroLengthCharacterString", "22" );
|
263
|
+
register_error_class( "2200F", klass );
|
264
|
+
}
|
265
|
+
{
|
266
|
+
VALUE klass = define_error_class( "FloatingPointException", "22" );
|
267
|
+
register_error_class( "22P01", klass );
|
268
|
+
}
|
269
|
+
{
|
270
|
+
VALUE klass = define_error_class( "InvalidTextRepresentation", "22" );
|
271
|
+
register_error_class( "22P02", klass );
|
272
|
+
}
|
273
|
+
{
|
274
|
+
VALUE klass = define_error_class( "InvalidBinaryRepresentation", "22" );
|
275
|
+
register_error_class( "22P03", klass );
|
276
|
+
}
|
277
|
+
{
|
278
|
+
VALUE klass = define_error_class( "BadCopyFileFormat", "22" );
|
279
|
+
register_error_class( "22P04", klass );
|
280
|
+
}
|
281
|
+
{
|
282
|
+
VALUE klass = define_error_class( "UntranslatableCharacter", "22" );
|
283
|
+
register_error_class( "22P05", klass );
|
284
|
+
}
|
285
|
+
{
|
286
|
+
VALUE klass = define_error_class( "NotAnXmlDocument", "22" );
|
287
|
+
register_error_class( "2200L", klass );
|
288
|
+
}
|
289
|
+
{
|
290
|
+
VALUE klass = define_error_class( "InvalidXmlDocument", "22" );
|
291
|
+
register_error_class( "2200M", klass );
|
292
|
+
}
|
293
|
+
{
|
294
|
+
VALUE klass = define_error_class( "InvalidXmlContent", "22" );
|
295
|
+
register_error_class( "2200N", klass );
|
296
|
+
}
|
297
|
+
{
|
298
|
+
VALUE klass = define_error_class( "InvalidXmlComment", "22" );
|
299
|
+
register_error_class( "2200S", klass );
|
300
|
+
}
|
301
|
+
{
|
302
|
+
VALUE klass = define_error_class( "InvalidXmlProcessingInstruction", "22" );
|
303
|
+
register_error_class( "2200T", klass );
|
304
|
+
}
|
305
|
+
{
|
306
|
+
VALUE klass = define_error_class( "DuplicateJsonObjectKeyValue", "22" );
|
307
|
+
register_error_class( "22030", klass );
|
308
|
+
}
|
309
|
+
{
|
310
|
+
VALUE klass = define_error_class( "InvalidJsonText", "22" );
|
311
|
+
register_error_class( "22032", klass );
|
312
|
+
}
|
313
|
+
{
|
314
|
+
VALUE klass = define_error_class( "InvalidSqlJsonSubscript", "22" );
|
315
|
+
register_error_class( "22033", klass );
|
316
|
+
}
|
317
|
+
{
|
318
|
+
VALUE klass = define_error_class( "MoreThanOneSqlJsonItem", "22" );
|
319
|
+
register_error_class( "22034", klass );
|
320
|
+
}
|
321
|
+
{
|
322
|
+
VALUE klass = define_error_class( "NoSqlJsonItem", "22" );
|
323
|
+
register_error_class( "22035", klass );
|
324
|
+
}
|
325
|
+
{
|
326
|
+
VALUE klass = define_error_class( "NonNumericSqlJsonItem", "22" );
|
327
|
+
register_error_class( "22036", klass );
|
328
|
+
}
|
329
|
+
{
|
330
|
+
VALUE klass = define_error_class( "NonUniqueKeysInAJsonObject", "22" );
|
331
|
+
register_error_class( "22037", klass );
|
332
|
+
}
|
333
|
+
{
|
334
|
+
VALUE klass = define_error_class( "SingletonSqlJsonItemRequired", "22" );
|
335
|
+
register_error_class( "22038", klass );
|
336
|
+
}
|
337
|
+
{
|
338
|
+
VALUE klass = define_error_class( "SqlJsonArrayNotFound", "22" );
|
339
|
+
register_error_class( "22039", klass );
|
340
|
+
}
|
341
|
+
{
|
342
|
+
VALUE klass = define_error_class( "SqlJsonMemberNotFound", "22" );
|
343
|
+
register_error_class( "2203A", klass );
|
344
|
+
}
|
345
|
+
{
|
346
|
+
VALUE klass = define_error_class( "SqlJsonNumberNotFound", "22" );
|
347
|
+
register_error_class( "2203B", klass );
|
348
|
+
}
|
349
|
+
{
|
350
|
+
VALUE klass = define_error_class( "SqlJsonObjectNotFound", "22" );
|
351
|
+
register_error_class( "2203C", klass );
|
352
|
+
}
|
353
|
+
{
|
354
|
+
VALUE klass = define_error_class( "TooManyJsonArrayElements", "22" );
|
355
|
+
register_error_class( "2203D", klass );
|
356
|
+
}
|
357
|
+
{
|
358
|
+
VALUE klass = define_error_class( "TooManyJsonObjectMembers", "22" );
|
359
|
+
register_error_class( "2203E", klass );
|
360
|
+
}
|
361
|
+
{
|
362
|
+
VALUE klass = define_error_class( "SqlJsonScalarRequired", "22" );
|
363
|
+
register_error_class( "2203F", klass );
|
364
|
+
}
|
365
|
+
{
|
366
|
+
VALUE klass = define_error_class( "IntegrityConstraintViolation", NULL );
|
367
|
+
register_error_class( "23000", klass );
|
368
|
+
register_error_class( "23", klass );
|
369
|
+
}
|
370
|
+
{
|
371
|
+
VALUE klass = define_error_class( "RestrictViolation", "23" );
|
372
|
+
register_error_class( "23001", klass );
|
373
|
+
}
|
374
|
+
{
|
375
|
+
VALUE klass = define_error_class( "NotNullViolation", "23" );
|
376
|
+
register_error_class( "23502", klass );
|
377
|
+
}
|
378
|
+
{
|
379
|
+
VALUE klass = define_error_class( "ForeignKeyViolation", "23" );
|
380
|
+
register_error_class( "23503", klass );
|
381
|
+
}
|
382
|
+
{
|
383
|
+
VALUE klass = define_error_class( "UniqueViolation", "23" );
|
384
|
+
register_error_class( "23505", klass );
|
385
|
+
}
|
386
|
+
{
|
387
|
+
VALUE klass = define_error_class( "CheckViolation", "23" );
|
388
|
+
register_error_class( "23514", klass );
|
389
|
+
}
|
390
|
+
{
|
391
|
+
VALUE klass = define_error_class( "ExclusionViolation", "23" );
|
392
|
+
register_error_class( "23P01", klass );
|
393
|
+
}
|
394
|
+
{
|
395
|
+
VALUE klass = define_error_class( "InvalidCursorState", NULL );
|
396
|
+
register_error_class( "24000", klass );
|
397
|
+
register_error_class( "24", klass );
|
398
|
+
}
|
399
|
+
{
|
400
|
+
VALUE klass = define_error_class( "InvalidTransactionState", NULL );
|
401
|
+
register_error_class( "25000", klass );
|
402
|
+
register_error_class( "25", klass );
|
403
|
+
}
|
404
|
+
{
|
405
|
+
VALUE klass = define_error_class( "ActiveSqlTransaction", "25" );
|
406
|
+
register_error_class( "25001", klass );
|
407
|
+
}
|
408
|
+
{
|
409
|
+
VALUE klass = define_error_class( "BranchTransactionAlreadyActive", "25" );
|
410
|
+
register_error_class( "25002", klass );
|
411
|
+
}
|
412
|
+
{
|
413
|
+
VALUE klass = define_error_class( "HeldCursorRequiresSameIsolationLevel", "25" );
|
414
|
+
register_error_class( "25008", klass );
|
415
|
+
}
|
416
|
+
{
|
417
|
+
VALUE klass = define_error_class( "InappropriateAccessModeForBranchTransaction", "25" );
|
418
|
+
register_error_class( "25003", klass );
|
419
|
+
}
|
420
|
+
{
|
421
|
+
VALUE klass = define_error_class( "InappropriateIsolationLevelForBranchTransaction", "25" );
|
422
|
+
register_error_class( "25004", klass );
|
423
|
+
}
|
424
|
+
{
|
425
|
+
VALUE klass = define_error_class( "NoActiveSqlTransactionForBranchTransaction", "25" );
|
426
|
+
register_error_class( "25005", klass );
|
427
|
+
}
|
428
|
+
{
|
429
|
+
VALUE klass = define_error_class( "ReadOnlySqlTransaction", "25" );
|
430
|
+
register_error_class( "25006", klass );
|
431
|
+
}
|
432
|
+
{
|
433
|
+
VALUE klass = define_error_class( "SchemaAndDataStatementMixingNotSupported", "25" );
|
434
|
+
register_error_class( "25007", klass );
|
435
|
+
}
|
436
|
+
{
|
437
|
+
VALUE klass = define_error_class( "NoActiveSqlTransaction", "25" );
|
438
|
+
register_error_class( "25P01", klass );
|
439
|
+
}
|
440
|
+
{
|
441
|
+
VALUE klass = define_error_class( "InFailedSqlTransaction", "25" );
|
442
|
+
register_error_class( "25P02", klass );
|
443
|
+
}
|
444
|
+
{
|
445
|
+
VALUE klass = define_error_class( "IdleInTransactionSessionTimeout", "25" );
|
446
|
+
register_error_class( "25P03", klass );
|
447
|
+
}
|
448
|
+
{
|
449
|
+
VALUE klass = define_error_class( "InvalidSqlStatementName", NULL );
|
450
|
+
register_error_class( "26000", klass );
|
451
|
+
register_error_class( "26", klass );
|
452
|
+
}
|
453
|
+
{
|
454
|
+
VALUE klass = define_error_class( "TriggeredDataChangeViolation", NULL );
|
455
|
+
register_error_class( "27000", klass );
|
456
|
+
register_error_class( "27", klass );
|
457
|
+
}
|
458
|
+
{
|
459
|
+
VALUE klass = define_error_class( "InvalidAuthorizationSpecification", NULL );
|
460
|
+
register_error_class( "28000", klass );
|
461
|
+
register_error_class( "28", klass );
|
462
|
+
}
|
463
|
+
{
|
464
|
+
VALUE klass = define_error_class( "InvalidPassword", "28" );
|
465
|
+
register_error_class( "28P01", klass );
|
466
|
+
}
|
467
|
+
{
|
468
|
+
VALUE klass = define_error_class( "DependentPrivilegeDescriptorsStillExist", NULL );
|
469
|
+
register_error_class( "2B000", klass );
|
470
|
+
register_error_class( "2B", klass );
|
471
|
+
}
|
472
|
+
{
|
473
|
+
VALUE klass = define_error_class( "DependentObjectsStillExist", "2B" );
|
474
|
+
register_error_class( "2BP01", klass );
|
475
|
+
}
|
476
|
+
{
|
477
|
+
VALUE klass = define_error_class( "InvalidTransactionTermination", NULL );
|
478
|
+
register_error_class( "2D000", klass );
|
479
|
+
register_error_class( "2D", klass );
|
480
|
+
}
|
481
|
+
{
|
482
|
+
VALUE klass = define_error_class( "SqlRoutineException", NULL );
|
483
|
+
register_error_class( "2F000", klass );
|
484
|
+
register_error_class( "2F", klass );
|
485
|
+
}
|
486
|
+
{
|
487
|
+
VALUE klass = define_error_class( "SREFunctionExecutedNoReturnStatement", "2F" );
|
488
|
+
register_error_class( "2F005", klass );
|
489
|
+
}
|
490
|
+
{
|
491
|
+
VALUE klass = define_error_class( "SREModifyingSqlDataNotPermitted", "2F" );
|
492
|
+
register_error_class( "2F002", klass );
|
493
|
+
}
|
494
|
+
{
|
495
|
+
VALUE klass = define_error_class( "SREProhibitedSqlStatementAttempted", "2F" );
|
496
|
+
register_error_class( "2F003", klass );
|
497
|
+
}
|
498
|
+
{
|
499
|
+
VALUE klass = define_error_class( "SREReadingSqlDataNotPermitted", "2F" );
|
500
|
+
register_error_class( "2F004", klass );
|
501
|
+
}
|
502
|
+
{
|
503
|
+
VALUE klass = define_error_class( "InvalidCursorName", NULL );
|
504
|
+
register_error_class( "34000", klass );
|
505
|
+
register_error_class( "34", klass );
|
506
|
+
}
|
507
|
+
{
|
508
|
+
VALUE klass = define_error_class( "ExternalRoutineException", NULL );
|
509
|
+
register_error_class( "38000", klass );
|
510
|
+
register_error_class( "38", klass );
|
511
|
+
}
|
512
|
+
{
|
513
|
+
VALUE klass = define_error_class( "EREContainingSqlNotPermitted", "38" );
|
514
|
+
register_error_class( "38001", klass );
|
515
|
+
}
|
516
|
+
{
|
517
|
+
VALUE klass = define_error_class( "EREModifyingSqlDataNotPermitted", "38" );
|
518
|
+
register_error_class( "38002", klass );
|
519
|
+
}
|
520
|
+
{
|
521
|
+
VALUE klass = define_error_class( "EREProhibitedSqlStatementAttempted", "38" );
|
522
|
+
register_error_class( "38003", klass );
|
523
|
+
}
|
524
|
+
{
|
525
|
+
VALUE klass = define_error_class( "EREReadingSqlDataNotPermitted", "38" );
|
526
|
+
register_error_class( "38004", klass );
|
527
|
+
}
|
528
|
+
{
|
529
|
+
VALUE klass = define_error_class( "ExternalRoutineInvocationException", NULL );
|
530
|
+
register_error_class( "39000", klass );
|
531
|
+
register_error_class( "39", klass );
|
532
|
+
}
|
533
|
+
{
|
534
|
+
VALUE klass = define_error_class( "ERIEInvalidSqlstateReturned", "39" );
|
535
|
+
register_error_class( "39001", klass );
|
536
|
+
}
|
537
|
+
{
|
538
|
+
VALUE klass = define_error_class( "ERIENullValueNotAllowed", "39" );
|
539
|
+
register_error_class( "39004", klass );
|
540
|
+
}
|
541
|
+
{
|
542
|
+
VALUE klass = define_error_class( "ERIETriggerProtocolViolated", "39" );
|
543
|
+
register_error_class( "39P01", klass );
|
544
|
+
}
|
545
|
+
{
|
546
|
+
VALUE klass = define_error_class( "ERIESrfProtocolViolated", "39" );
|
547
|
+
register_error_class( "39P02", klass );
|
548
|
+
}
|
549
|
+
{
|
550
|
+
VALUE klass = define_error_class( "ERIEEventTriggerProtocolViolated", "39" );
|
551
|
+
register_error_class( "39P03", klass );
|
552
|
+
}
|
553
|
+
{
|
554
|
+
VALUE klass = define_error_class( "SavepointException", NULL );
|
555
|
+
register_error_class( "3B000", klass );
|
556
|
+
register_error_class( "3B", klass );
|
557
|
+
}
|
558
|
+
{
|
559
|
+
VALUE klass = define_error_class( "SEInvalidSpecification", "3B" );
|
560
|
+
register_error_class( "3B001", klass );
|
561
|
+
}
|
562
|
+
{
|
563
|
+
VALUE klass = define_error_class( "InvalidCatalogName", NULL );
|
564
|
+
register_error_class( "3D000", klass );
|
565
|
+
register_error_class( "3D", klass );
|
566
|
+
}
|
567
|
+
{
|
568
|
+
VALUE klass = define_error_class( "InvalidSchemaName", NULL );
|
569
|
+
register_error_class( "3F000", klass );
|
570
|
+
register_error_class( "3F", klass );
|
571
|
+
}
|
572
|
+
{
|
573
|
+
VALUE klass = define_error_class( "TransactionRollback", NULL );
|
574
|
+
register_error_class( "40000", klass );
|
575
|
+
register_error_class( "40", klass );
|
576
|
+
}
|
577
|
+
{
|
578
|
+
VALUE klass = define_error_class( "TRIntegrityConstraintViolation", "40" );
|
579
|
+
register_error_class( "40002", klass );
|
580
|
+
}
|
581
|
+
{
|
582
|
+
VALUE klass = define_error_class( "TRSerializationFailure", "40" );
|
583
|
+
register_error_class( "40001", klass );
|
584
|
+
}
|
585
|
+
{
|
586
|
+
VALUE klass = define_error_class( "TRStatementCompletionUnknown", "40" );
|
587
|
+
register_error_class( "40003", klass );
|
588
|
+
}
|
589
|
+
{
|
590
|
+
VALUE klass = define_error_class( "TRDeadlockDetected", "40" );
|
591
|
+
register_error_class( "40P01", klass );
|
592
|
+
}
|
593
|
+
{
|
594
|
+
VALUE klass = define_error_class( "SyntaxErrorOrAccessRuleViolation", NULL );
|
595
|
+
register_error_class( "42000", klass );
|
596
|
+
register_error_class( "42", klass );
|
597
|
+
}
|
598
|
+
{
|
599
|
+
VALUE klass = define_error_class( "SyntaxError", "42" );
|
600
|
+
register_error_class( "42601", klass );
|
601
|
+
}
|
602
|
+
{
|
603
|
+
VALUE klass = define_error_class( "InsufficientPrivilege", "42" );
|
604
|
+
register_error_class( "42501", klass );
|
605
|
+
}
|
606
|
+
{
|
607
|
+
VALUE klass = define_error_class( "CannotCoerce", "42" );
|
608
|
+
register_error_class( "42846", klass );
|
609
|
+
}
|
610
|
+
{
|
611
|
+
VALUE klass = define_error_class( "GroupingError", "42" );
|
612
|
+
register_error_class( "42803", klass );
|
613
|
+
}
|
614
|
+
{
|
615
|
+
VALUE klass = define_error_class( "WindowingError", "42" );
|
616
|
+
register_error_class( "42P20", klass );
|
617
|
+
}
|
618
|
+
{
|
619
|
+
VALUE klass = define_error_class( "InvalidRecursion", "42" );
|
620
|
+
register_error_class( "42P19", klass );
|
621
|
+
}
|
622
|
+
{
|
623
|
+
VALUE klass = define_error_class( "InvalidForeignKey", "42" );
|
624
|
+
register_error_class( "42830", klass );
|
625
|
+
}
|
626
|
+
{
|
627
|
+
VALUE klass = define_error_class( "InvalidName", "42" );
|
628
|
+
register_error_class( "42602", klass );
|
629
|
+
}
|
630
|
+
{
|
631
|
+
VALUE klass = define_error_class( "NameTooLong", "42" );
|
632
|
+
register_error_class( "42622", klass );
|
633
|
+
}
|
634
|
+
{
|
635
|
+
VALUE klass = define_error_class( "ReservedName", "42" );
|
636
|
+
register_error_class( "42939", klass );
|
637
|
+
}
|
638
|
+
{
|
639
|
+
VALUE klass = define_error_class( "DatatypeMismatch", "42" );
|
640
|
+
register_error_class( "42804", klass );
|
641
|
+
}
|
642
|
+
{
|
643
|
+
VALUE klass = define_error_class( "IndeterminateDatatype", "42" );
|
644
|
+
register_error_class( "42P18", klass );
|
645
|
+
}
|
646
|
+
{
|
647
|
+
VALUE klass = define_error_class( "CollationMismatch", "42" );
|
648
|
+
register_error_class( "42P21", klass );
|
649
|
+
}
|
650
|
+
{
|
651
|
+
VALUE klass = define_error_class( "IndeterminateCollation", "42" );
|
652
|
+
register_error_class( "42P22", klass );
|
653
|
+
}
|
654
|
+
{
|
655
|
+
VALUE klass = define_error_class( "WrongObjectType", "42" );
|
656
|
+
register_error_class( "42809", klass );
|
657
|
+
}
|
658
|
+
{
|
659
|
+
VALUE klass = define_error_class( "GeneratedAlways", "42" );
|
660
|
+
register_error_class( "428C9", klass );
|
661
|
+
}
|
662
|
+
{
|
663
|
+
VALUE klass = define_error_class( "UndefinedColumn", "42" );
|
664
|
+
register_error_class( "42703", klass );
|
665
|
+
}
|
666
|
+
{
|
667
|
+
VALUE klass = define_error_class( "UndefinedFunction", "42" );
|
668
|
+
register_error_class( "42883", klass );
|
669
|
+
}
|
670
|
+
{
|
671
|
+
VALUE klass = define_error_class( "UndefinedTable", "42" );
|
672
|
+
register_error_class( "42P01", klass );
|
673
|
+
}
|
674
|
+
{
|
675
|
+
VALUE klass = define_error_class( "UndefinedParameter", "42" );
|
676
|
+
register_error_class( "42P02", klass );
|
677
|
+
}
|
678
|
+
{
|
679
|
+
VALUE klass = define_error_class( "UndefinedObject", "42" );
|
680
|
+
register_error_class( "42704", klass );
|
681
|
+
}
|
682
|
+
{
|
683
|
+
VALUE klass = define_error_class( "DuplicateColumn", "42" );
|
684
|
+
register_error_class( "42701", klass );
|
685
|
+
}
|
686
|
+
{
|
687
|
+
VALUE klass = define_error_class( "DuplicateCursor", "42" );
|
688
|
+
register_error_class( "42P03", klass );
|
689
|
+
}
|
690
|
+
{
|
691
|
+
VALUE klass = define_error_class( "DuplicateDatabase", "42" );
|
692
|
+
register_error_class( "42P04", klass );
|
693
|
+
}
|
694
|
+
{
|
695
|
+
VALUE klass = define_error_class( "DuplicateFunction", "42" );
|
696
|
+
register_error_class( "42723", klass );
|
697
|
+
}
|
698
|
+
{
|
699
|
+
VALUE klass = define_error_class( "DuplicatePstatement", "42" );
|
700
|
+
register_error_class( "42P05", klass );
|
701
|
+
}
|
702
|
+
{
|
703
|
+
VALUE klass = define_error_class( "DuplicateSchema", "42" );
|
704
|
+
register_error_class( "42P06", klass );
|
705
|
+
}
|
706
|
+
{
|
707
|
+
VALUE klass = define_error_class( "DuplicateTable", "42" );
|
708
|
+
register_error_class( "42P07", klass );
|
709
|
+
}
|
710
|
+
{
|
711
|
+
VALUE klass = define_error_class( "DuplicateAlias", "42" );
|
712
|
+
register_error_class( "42712", klass );
|
713
|
+
}
|
714
|
+
{
|
715
|
+
VALUE klass = define_error_class( "DuplicateObject", "42" );
|
716
|
+
register_error_class( "42710", klass );
|
717
|
+
}
|
718
|
+
{
|
719
|
+
VALUE klass = define_error_class( "AmbiguousColumn", "42" );
|
720
|
+
register_error_class( "42702", klass );
|
721
|
+
}
|
722
|
+
{
|
723
|
+
VALUE klass = define_error_class( "AmbiguousFunction", "42" );
|
724
|
+
register_error_class( "42725", klass );
|
725
|
+
}
|
726
|
+
{
|
727
|
+
VALUE klass = define_error_class( "AmbiguousParameter", "42" );
|
728
|
+
register_error_class( "42P08", klass );
|
729
|
+
}
|
730
|
+
{
|
731
|
+
VALUE klass = define_error_class( "AmbiguousAlias", "42" );
|
732
|
+
register_error_class( "42P09", klass );
|
733
|
+
}
|
734
|
+
{
|
735
|
+
VALUE klass = define_error_class( "InvalidColumnReference", "42" );
|
736
|
+
register_error_class( "42P10", klass );
|
737
|
+
}
|
738
|
+
{
|
739
|
+
VALUE klass = define_error_class( "InvalidColumnDefinition", "42" );
|
740
|
+
register_error_class( "42611", klass );
|
741
|
+
}
|
742
|
+
{
|
743
|
+
VALUE klass = define_error_class( "InvalidCursorDefinition", "42" );
|
744
|
+
register_error_class( "42P11", klass );
|
745
|
+
}
|
746
|
+
{
|
747
|
+
VALUE klass = define_error_class( "InvalidDatabaseDefinition", "42" );
|
748
|
+
register_error_class( "42P12", klass );
|
749
|
+
}
|
750
|
+
{
|
751
|
+
VALUE klass = define_error_class( "InvalidFunctionDefinition", "42" );
|
752
|
+
register_error_class( "42P13", klass );
|
753
|
+
}
|
754
|
+
{
|
755
|
+
VALUE klass = define_error_class( "InvalidPstatementDefinition", "42" );
|
756
|
+
register_error_class( "42P14", klass );
|
757
|
+
}
|
758
|
+
{
|
759
|
+
VALUE klass = define_error_class( "InvalidSchemaDefinition", "42" );
|
760
|
+
register_error_class( "42P15", klass );
|
761
|
+
}
|
762
|
+
{
|
763
|
+
VALUE klass = define_error_class( "InvalidTableDefinition", "42" );
|
764
|
+
register_error_class( "42P16", klass );
|
765
|
+
}
|
766
|
+
{
|
767
|
+
VALUE klass = define_error_class( "InvalidObjectDefinition", "42" );
|
768
|
+
register_error_class( "42P17", klass );
|
769
|
+
}
|
770
|
+
{
|
771
|
+
VALUE klass = define_error_class( "WithCheckOptionViolation", NULL );
|
772
|
+
register_error_class( "44000", klass );
|
773
|
+
register_error_class( "44", klass );
|
774
|
+
}
|
775
|
+
{
|
776
|
+
VALUE klass = define_error_class( "InsufficientResources", NULL );
|
777
|
+
register_error_class( "53000", klass );
|
778
|
+
register_error_class( "53", klass );
|
779
|
+
}
|
780
|
+
{
|
781
|
+
VALUE klass = define_error_class( "DiskFull", "53" );
|
782
|
+
register_error_class( "53100", klass );
|
783
|
+
}
|
784
|
+
{
|
785
|
+
VALUE klass = define_error_class( "OutOfMemory", "53" );
|
786
|
+
register_error_class( "53200", klass );
|
787
|
+
}
|
788
|
+
{
|
789
|
+
VALUE klass = define_error_class( "TooManyConnections", "53" );
|
790
|
+
register_error_class( "53300", klass );
|
791
|
+
}
|
792
|
+
{
|
793
|
+
VALUE klass = define_error_class( "ConfigurationLimitExceeded", "53" );
|
794
|
+
register_error_class( "53400", klass );
|
795
|
+
}
|
796
|
+
{
|
797
|
+
VALUE klass = define_error_class( "ProgramLimitExceeded", NULL );
|
798
|
+
register_error_class( "54000", klass );
|
799
|
+
register_error_class( "54", klass );
|
800
|
+
}
|
801
|
+
{
|
802
|
+
VALUE klass = define_error_class( "StatementTooComplex", "54" );
|
803
|
+
register_error_class( "54001", klass );
|
804
|
+
}
|
805
|
+
{
|
806
|
+
VALUE klass = define_error_class( "TooManyColumns", "54" );
|
807
|
+
register_error_class( "54011", klass );
|
808
|
+
}
|
809
|
+
{
|
810
|
+
VALUE klass = define_error_class( "TooManyArguments", "54" );
|
811
|
+
register_error_class( "54023", klass );
|
812
|
+
}
|
813
|
+
{
|
814
|
+
VALUE klass = define_error_class( "ObjectNotInPrerequisiteState", NULL );
|
815
|
+
register_error_class( "55000", klass );
|
816
|
+
register_error_class( "55", klass );
|
817
|
+
}
|
818
|
+
{
|
819
|
+
VALUE klass = define_error_class( "ObjectInUse", "55" );
|
820
|
+
register_error_class( "55006", klass );
|
821
|
+
}
|
822
|
+
{
|
823
|
+
VALUE klass = define_error_class( "CantChangeRuntimeParam", "55" );
|
824
|
+
register_error_class( "55P02", klass );
|
825
|
+
}
|
826
|
+
{
|
827
|
+
VALUE klass = define_error_class( "LockNotAvailable", "55" );
|
828
|
+
register_error_class( "55P03", klass );
|
829
|
+
}
|
830
|
+
{
|
831
|
+
VALUE klass = define_error_class( "UnsafeNewEnumValueUsage", "55" );
|
832
|
+
register_error_class( "55P04", klass );
|
833
|
+
}
|
834
|
+
{
|
835
|
+
VALUE klass = define_error_class( "OperatorIntervention", NULL );
|
836
|
+
register_error_class( "57000", klass );
|
837
|
+
register_error_class( "57", klass );
|
838
|
+
}
|
839
|
+
{
|
840
|
+
VALUE klass = define_error_class( "QueryCanceled", "57" );
|
841
|
+
register_error_class( "57014", klass );
|
842
|
+
}
|
843
|
+
{
|
844
|
+
VALUE klass = define_error_class( "AdminShutdown", "57" );
|
845
|
+
register_error_class( "57P01", klass );
|
846
|
+
}
|
847
|
+
{
|
848
|
+
VALUE klass = define_error_class( "CrashShutdown", "57" );
|
849
|
+
register_error_class( "57P02", klass );
|
850
|
+
}
|
851
|
+
{
|
852
|
+
VALUE klass = define_error_class( "CannotConnectNow", "57" );
|
853
|
+
register_error_class( "57P03", klass );
|
854
|
+
}
|
855
|
+
{
|
856
|
+
VALUE klass = define_error_class( "DatabaseDropped", "57" );
|
857
|
+
register_error_class( "57P04", klass );
|
858
|
+
}
|
859
|
+
{
|
860
|
+
VALUE klass = define_error_class( "SystemError", NULL );
|
861
|
+
register_error_class( "58000", klass );
|
862
|
+
register_error_class( "58", klass );
|
863
|
+
}
|
864
|
+
{
|
865
|
+
VALUE klass = define_error_class( "IoError", "58" );
|
866
|
+
register_error_class( "58030", klass );
|
867
|
+
}
|
868
|
+
{
|
869
|
+
VALUE klass = define_error_class( "UndefinedFile", "58" );
|
870
|
+
register_error_class( "58P01", klass );
|
871
|
+
}
|
872
|
+
{
|
873
|
+
VALUE klass = define_error_class( "DuplicateFile", "58" );
|
874
|
+
register_error_class( "58P02", klass );
|
875
|
+
}
|
876
|
+
{
|
877
|
+
VALUE klass = define_error_class( "SnapshotTooOld", NULL );
|
878
|
+
register_error_class( "72000", klass );
|
879
|
+
register_error_class( "72", klass );
|
880
|
+
}
|
881
|
+
{
|
882
|
+
VALUE klass = define_error_class( "ConfigFileError", NULL );
|
883
|
+
register_error_class( "F0000", klass );
|
884
|
+
register_error_class( "F0", klass );
|
885
|
+
}
|
886
|
+
{
|
887
|
+
VALUE klass = define_error_class( "LockFileExists", "F0" );
|
888
|
+
register_error_class( "F0001", klass );
|
889
|
+
}
|
890
|
+
{
|
891
|
+
VALUE klass = define_error_class( "FdwError", NULL );
|
892
|
+
register_error_class( "HV000", klass );
|
893
|
+
register_error_class( "HV", klass );
|
894
|
+
}
|
895
|
+
{
|
896
|
+
VALUE klass = define_error_class( "FdwColumnNameNotFound", "HV" );
|
897
|
+
register_error_class( "HV005", klass );
|
898
|
+
}
|
899
|
+
{
|
900
|
+
VALUE klass = define_error_class( "FdwDynamicParameterValueNeeded", "HV" );
|
901
|
+
register_error_class( "HV002", klass );
|
902
|
+
}
|
903
|
+
{
|
904
|
+
VALUE klass = define_error_class( "FdwFunctionSequenceError", "HV" );
|
905
|
+
register_error_class( "HV010", klass );
|
906
|
+
}
|
907
|
+
{
|
908
|
+
VALUE klass = define_error_class( "FdwInconsistentDescriptorInformation", "HV" );
|
909
|
+
register_error_class( "HV021", klass );
|
910
|
+
}
|
911
|
+
{
|
912
|
+
VALUE klass = define_error_class( "FdwInvalidAttributeValue", "HV" );
|
913
|
+
register_error_class( "HV024", klass );
|
914
|
+
}
|
915
|
+
{
|
916
|
+
VALUE klass = define_error_class( "FdwInvalidColumnName", "HV" );
|
917
|
+
register_error_class( "HV007", klass );
|
918
|
+
}
|
919
|
+
{
|
920
|
+
VALUE klass = define_error_class( "FdwInvalidColumnNumber", "HV" );
|
921
|
+
register_error_class( "HV008", klass );
|
922
|
+
}
|
923
|
+
{
|
924
|
+
VALUE klass = define_error_class( "FdwInvalidDataType", "HV" );
|
925
|
+
register_error_class( "HV004", klass );
|
926
|
+
}
|
927
|
+
{
|
928
|
+
VALUE klass = define_error_class( "FdwInvalidDataTypeDescriptors", "HV" );
|
929
|
+
register_error_class( "HV006", klass );
|
930
|
+
}
|
931
|
+
{
|
932
|
+
VALUE klass = define_error_class( "FdwInvalidDescriptorFieldIdentifier", "HV" );
|
933
|
+
register_error_class( "HV091", klass );
|
934
|
+
}
|
935
|
+
{
|
936
|
+
VALUE klass = define_error_class( "FdwInvalidHandle", "HV" );
|
937
|
+
register_error_class( "HV00B", klass );
|
938
|
+
}
|
939
|
+
{
|
940
|
+
VALUE klass = define_error_class( "FdwInvalidOptionIndex", "HV" );
|
941
|
+
register_error_class( "HV00C", klass );
|
942
|
+
}
|
943
|
+
{
|
944
|
+
VALUE klass = define_error_class( "FdwInvalidOptionName", "HV" );
|
945
|
+
register_error_class( "HV00D", klass );
|
946
|
+
}
|
947
|
+
{
|
948
|
+
VALUE klass = define_error_class( "FdwInvalidStringLengthOrBufferLength", "HV" );
|
949
|
+
register_error_class( "HV090", klass );
|
950
|
+
}
|
951
|
+
{
|
952
|
+
VALUE klass = define_error_class( "FdwInvalidStringFormat", "HV" );
|
953
|
+
register_error_class( "HV00A", klass );
|
954
|
+
}
|
955
|
+
{
|
956
|
+
VALUE klass = define_error_class( "FdwInvalidUseOfNullPointer", "HV" );
|
957
|
+
register_error_class( "HV009", klass );
|
958
|
+
}
|
959
|
+
{
|
960
|
+
VALUE klass = define_error_class( "FdwTooManyHandles", "HV" );
|
961
|
+
register_error_class( "HV014", klass );
|
962
|
+
}
|
963
|
+
{
|
964
|
+
VALUE klass = define_error_class( "FdwOutOfMemory", "HV" );
|
965
|
+
register_error_class( "HV001", klass );
|
966
|
+
}
|
967
|
+
{
|
968
|
+
VALUE klass = define_error_class( "FdwNoSchemas", "HV" );
|
969
|
+
register_error_class( "HV00P", klass );
|
970
|
+
}
|
971
|
+
{
|
972
|
+
VALUE klass = define_error_class( "FdwOptionNameNotFound", "HV" );
|
973
|
+
register_error_class( "HV00J", klass );
|
974
|
+
}
|
975
|
+
{
|
976
|
+
VALUE klass = define_error_class( "FdwReplyHandle", "HV" );
|
977
|
+
register_error_class( "HV00K", klass );
|
978
|
+
}
|
979
|
+
{
|
980
|
+
VALUE klass = define_error_class( "FdwSchemaNotFound", "HV" );
|
981
|
+
register_error_class( "HV00Q", klass );
|
982
|
+
}
|
983
|
+
{
|
984
|
+
VALUE klass = define_error_class( "FdwTableNotFound", "HV" );
|
985
|
+
register_error_class( "HV00R", klass );
|
986
|
+
}
|
987
|
+
{
|
988
|
+
VALUE klass = define_error_class( "FdwUnableToCreateExecution", "HV" );
|
989
|
+
register_error_class( "HV00L", klass );
|
990
|
+
}
|
991
|
+
{
|
992
|
+
VALUE klass = define_error_class( "FdwUnableToCreateReply", "HV" );
|
993
|
+
register_error_class( "HV00M", klass );
|
994
|
+
}
|
995
|
+
{
|
996
|
+
VALUE klass = define_error_class( "FdwUnableToEstablishConnection", "HV" );
|
997
|
+
register_error_class( "HV00N", klass );
|
998
|
+
}
|
999
|
+
{
|
1000
|
+
VALUE klass = define_error_class( "PlpgsqlError", NULL );
|
1001
|
+
register_error_class( "P0000", klass );
|
1002
|
+
register_error_class( "P0", klass );
|
1003
|
+
}
|
1004
|
+
{
|
1005
|
+
VALUE klass = define_error_class( "RaiseException", "P0" );
|
1006
|
+
register_error_class( "P0001", klass );
|
1007
|
+
}
|
1008
|
+
{
|
1009
|
+
VALUE klass = define_error_class( "NoDataFound", "P0" );
|
1010
|
+
register_error_class( "P0002", klass );
|
1011
|
+
}
|
1012
|
+
{
|
1013
|
+
VALUE klass = define_error_class( "TooManyRows", "P0" );
|
1014
|
+
register_error_class( "P0003", klass );
|
1015
|
+
}
|
1016
|
+
{
|
1017
|
+
VALUE klass = define_error_class( "AssertFailure", "P0" );
|
1018
|
+
register_error_class( "P0004", klass );
|
1019
|
+
}
|
1020
|
+
{
|
1021
|
+
VALUE klass = define_error_class( "InternalError", NULL );
|
1022
|
+
register_error_class( "XX000", klass );
|
1023
|
+
register_error_class( "XX", klass );
|
1024
|
+
}
|
1025
|
+
{
|
1026
|
+
VALUE klass = define_error_class( "DataCorrupted", "XX" );
|
1027
|
+
register_error_class( "XX001", klass );
|
1028
|
+
}
|
1029
|
+
{
|
1030
|
+
VALUE klass = define_error_class( "IndexCorrupted", "XX" );
|
1031
|
+
register_error_class( "XX002", klass );
|
1032
|
+
}
|