File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v8_0
Xtensive.Orm.Tests.Framework Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -514,17 +514,19 @@ protected virtual void ReadSchemaData(DbDataReader dataReader, ExtractionContext
514
514
{
515
515
var oid = Convert . ToInt64 ( dataReader [ "oid" ] ) ;
516
516
var name = dataReader [ "nspname" ] . ToString ( ) ;
517
- var owner = Convert . ToInt64 ( dataReader [ "nspowner" ] ) ;
517
+ var ownerOid = Convert . ToInt64 ( dataReader [ "nspowner" ] ) ;
518
518
519
519
var catalog = context . Catalog ;
520
- var schema = catalog . Schemas [ name ] ?? catalog . CreateSchema ( name ) ;
521
- if ( name == "public" ) {
522
- catalog . DefaultSchema = schema ;
523
- }
520
+ if ( context . UserLookup . TryGetValue ( ownerOid , out var ownerName ) ) {
521
+ var schema = catalog . Schemas [ name ] ?? catalog . CreateSchema ( name ) ;
522
+ if ( name == "public" ) {
523
+ catalog . DefaultSchema = schema ;
524
+ }
524
525
525
- schema . Owner = context . UserLookup [ owner ] ;
526
- context . SchemaMap [ oid ] = schema ;
527
- context . ReversedSchemaMap [ schema ] = oid ;
526
+ schema . Owner = ownerName ;
527
+ context . SchemaMap [ oid ] = schema ;
528
+ context . ReversedSchemaMap [ schema ] = oid ;
529
+ }
528
530
}
529
531
530
532
private void ExtractSchemaContents ( ExtractionContext context )
@@ -1432,4 +1434,4 @@ public Extractor(SqlDriver driver)
1432
1434
{
1433
1435
}
1434
1436
}
1435
- }
1437
+ }
Original file line number Diff line number Diff line change 73
73
connectionUrl =" postgresql://dotest:dotest@localhost:54150/dotest" />
74
74
75
75
<domain name =" pgsql160"
76
- connectionUrl =" postgresql://dotest:dotest@localhost :5432/dotest" />
76
+ connectionUrl =" postgresql://dotest:dotest@pghost :5432/dotest" />
77
77
78
78
<domain name =" oracle10"
79
79
connectionUrl =" oracle://dotest:dotest@localhost:5510/ora10" />
170
170
<domain name =" pgsql150cs" provider =" postgresql"
171
171
connectionString =" HOST=localhost;PORT=54150;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest" />
172
172
173
+ <domain name =" pgsql160cs" provider =" postgresql"
174
+ connectionString =" HOST=pghost;PORT=5432;DATABASE=dotest;USER ID=dotest;PASSWORD=dotest" />
175
+
173
176
<domain name =" oracle10cs" provider =" oracle"
174
177
connectionString =" DATA SOURCE=" (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=5510))(CONNECT_DATA=(SERVICE_NAME=ora10)))" ;USER ID=dotest;PASSWORD=dotest" />
175
178
You can’t perform that action at this time.
0 commit comments