Skip to content

Commit 9d67cdc

Browse files
committed
Add logging to ImportForeignSchema
1 parent 3f8f7e5 commit 9d67cdc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fdw.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,11 @@ func goFdwImportForeignSchema(stmt *C.ImportForeignSchemaStmt, serverOid C.Oid)
374374
}
375375
}()
376376

377-
log.Printf("[TRACE] goFdwImportForeignSchema remote '%s' local '%s'\n", C.GoString(stmt.remote_schema), C.GoString(stmt.local_schema))
377+
log.Printf("[WARN] goFdwImportForeignSchema remote '%s' local '%s'\n", C.GoString(stmt.remote_schema), C.GoString(stmt.local_schema))
378378
// get the plugin hub,
379379
pluginHub, err := hub.GetHub()
380380
if err != nil {
381+
log.Printf("[WARN] goFdwImportForeignSchema failed: %s", err)
381382
FdwError(err)
382383
return nil
383384
}
@@ -394,10 +395,13 @@ func goFdwImportForeignSchema(stmt *C.ImportForeignSchemaStmt, serverOid C.Oid)
394395

395396
schema, err := pluginHub.GetSchema(remoteSchema, localSchema)
396397
if err != nil {
398+
log.Printf("[WARN] goFdwImportForeignSchema failed: %s", err)
397399
FdwError(err)
398400
return nil
399401
}
400-
return SchemaToSql(schema.Schema, stmt, serverOid)
402+
res := SchemaToSql(schema.Schema, stmt, serverOid)
403+
log.Printf("[WARN] goFdwImportForeignSchema returning import sql")
404+
return res
401405
}
402406

403407
//export goFdwExecForeignInsert

0 commit comments

Comments
 (0)