@@ -45,7 +45,7 @@ public override Schema ExtractSchema(string catalogName, string schemaName)
4545 {
4646 targetSchemes . Clear ( ) ;
4747 theCatalog = new Catalog ( catalogName ) ;
48- var targetSchema = schemaName . ToUpperInvariant ( ) ;
48+ var targetSchema = ToUpperInvariantIfNeeded ( schemaName ) ;
4949 targetSchemes . Add ( targetSchema ) ;
5050
5151 RegisterReplacements ( replacementsRegistry ) ;
@@ -60,7 +60,7 @@ public override Catalog ExtractSchemes(string catalogName, string[] schemaNames)
6060 theCatalog = new Catalog ( catalogName ) ;
6161 targetSchemes . Clear ( ) ;
6262 foreach ( var schemaName in schemaNames ) {
63- var targetSchema = schemaName . ToUpperInvariant ( ) ;
63+ var targetSchema = ToUpperInvariantIfNeeded ( schemaName ) ;
6464 targetSchemes . Add ( targetSchema ) ;
6565 }
6666
@@ -71,6 +71,11 @@ public override Catalog ExtractSchemes(string catalogName, string[] schemaNames)
7171 return theCatalog ;
7272 }
7373
74+ protected virtual string ToUpperInvariantIfNeeded ( string schemaName )
75+ {
76+ return schemaName . ToUpperInvariant ( ) ;
77+ }
78+
7479 private void ExtractCatalogContents ( )
7580 {
7681 ExtractTables ( ) ;
@@ -92,7 +97,7 @@ private void ExtractSchemas()
9297 while ( reader . Read ( ) )
9398 theCatalog . CreateSchema ( reader . GetString ( 0 ) ) ;
9499 // choosing the default schema
95- var defaultSchemaName = Driver . CoreServerInfo . DefaultSchemaName . ToUpperInvariant ( ) ;
100+ var defaultSchemaName = ToUpperInvariantIfNeeded ( Driver . CoreServerInfo . DefaultSchemaName ) . ToUpperInvariant ( ) ;
96101 var defaultSchema = theCatalog . Schemas [ defaultSchemaName ] ;
97102 theCatalog . DefaultSchema = defaultSchema ;
98103 }
0 commit comments