Skip to content

Commit 7f7b1dd

Browse files
- Postgres externnal restoration.
1 parent 8ce602c commit 7f7b1dd

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
"delete from aws.transfer.servers where data__ServerId = 's-0000000001' and region = 'ap-southeast-2';",
184184
"replace google.compute.firewalls set data__disabled = 'true' where project = 'mutable-project' and firewall = 'replacable-firewall' returning *;",
185185
"replace /*+ AWAIT */ google.compute.firewalls set data__disabled = 'true' where project = 'mutable-project' and firewall = 'replacable-firewall' returning *;",
186+
"select role_name from pgi.information_schema.applicable_roles order by role_name desc;",
186187
],
187188
"default": "show providers;"
188189
},

internal/stackql/dependencyplanner/dependencyplanner.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ func (dp *standardDependencyPlanner) processOrphan(
398398
if err != nil {
399399
return nil, nil, err
400400
}
401+
402+
tableMetadata := annotationCtx.GetTableMeta()
403+
401404
_, isSQLDataSource := annotationCtx.GetTableMeta().GetSQLDataSource()
402405
var opStore anysdk.StandardOperationStore
403406
if !isSQLDataSource {
@@ -416,9 +419,19 @@ func (dp *standardDependencyPlanner) processOrphan(
416419
if err != nil {
417420
return nil, nil, err
418421
}
419-
}
420422

421-
tableMetadata := annotationCtx.GetTableMeta()
423+
insPsc, insPscErr := dp.primitiveComposer.GetDRMConfig().GenerateInsertDML(
424+
anTab,
425+
nil,
426+
nil,
427+
nil,
428+
opStore,
429+
tcc,
430+
false,
431+
annotationCtx.IsAwait(),
432+
)
433+
return insPsc, tcc, insPscErr
434+
}
422435

423436
anySdkProv, anySdkPrvErr := tableMetadata.GetProviderObject()
424437
if anySdkPrvErr != nil {

0 commit comments

Comments
 (0)