Skip to content

Commit 4e3953a

Browse files
gcf-owl-bot[bot]d-googsofisl
authored
feat: [sql] add Postgres Import/Export config messages (#5572)
* feat: add Postgres Import/Export config messages PiperOrigin-RevId: 655231833 Source-Link: googleapis/googleapis@51d7fa8 Source-Link: googleapis/googleapis-gen@95aaf66 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiOTVhYWY2NmVhYWJiZTI1OGIzMDkyYWY1OTBlYmY1NTc3YjE5MWMzMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Daniel Bankhead <[email protected]> Co-authored-by: sofisl <[email protected]>
1 parent 7500af4 commit 4e3953a

4 files changed

Lines changed: 837 additions & 0 deletions

File tree

packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_resources.proto

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,20 @@ message ExportContext {
349349
google.protobuf.Int32Value master_data = 1;
350350
}
351351

352+
// Options for exporting from a Cloud SQL for PostgreSQL instance.
353+
message PostgresExportOptions {
354+
// Optional. Use this option to include DROP <object> SQL statements.
355+
// These statements are used to delete database objects before running the
356+
// import operation.
357+
google.protobuf.BoolValue clean = 1
358+
[(google.api.field_behavior) = OPTIONAL];
359+
360+
// Optional. Option to include an IF EXISTS SQL statement with each DROP
361+
// statement produced by clean.
362+
google.protobuf.BoolValue if_exists = 2
363+
[(google.api.field_behavior) = OPTIONAL];
364+
}
365+
352366
// Tables to export, or that were exported, from the specified database. If
353367
// you specify tables, specify one and only one database. For PostgreSQL
354368
// instances, you can specify only one table.
@@ -366,6 +380,10 @@ message ExportContext {
366380
// Optional. Whether or not the export should be parallel.
367381
google.protobuf.BoolValue parallel = 5
368382
[(google.api.field_behavior) = OPTIONAL];
383+
384+
// Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.
385+
PostgresExportOptions postgres_export_options = 6
386+
[(google.api.field_behavior) = OPTIONAL];
369387
}
370388

371389
// Options for exporting BAK files (SQL Server-only)
@@ -433,13 +451,29 @@ message ExportContext {
433451
// Database instance import context.
434452
message ImportContext {
435453
message SqlImportOptions {
454+
message PostgresImportOptions {
455+
// Optional. The --clean flag for the pg_restore utility. This flag
456+
// applies only if you enabled Cloud SQL to import files in parallel.
457+
google.protobuf.BoolValue clean = 1
458+
[(google.api.field_behavior) = OPTIONAL];
459+
460+
// Optional. The --if-exists flag for the pg_restore utility. This flag
461+
// applies only if you enabled Cloud SQL to import files in parallel.
462+
google.protobuf.BoolValue if_exists = 2
463+
[(google.api.field_behavior) = OPTIONAL];
464+
}
465+
436466
// Optional. The number of threads to use for parallel import.
437467
google.protobuf.Int32Value threads = 1
438468
[(google.api.field_behavior) = OPTIONAL];
439469

440470
// Optional. Whether or not the import should be parallel.
441471
google.protobuf.BoolValue parallel = 2
442472
[(google.api.field_behavior) = OPTIONAL];
473+
474+
// Optional. Options for importing from a Cloud SQL for PostgreSQL instance.
475+
PostgresImportOptions postgres_import_options = 3
476+
[(google.api.field_behavior) = OPTIONAL];
443477
}
444478

445479
message SqlCsvImportOptions {

packages/google-cloud-sql/protos/protos.d.ts

Lines changed: 221 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)