fix(postgres): include owner and grants in displayed DDL

This commit is contained in:
zipg authored and GitHub committed 2026-07-27 21:45:35 +08:00
1 parent a5eb6fd1fa
commit 1d671ca698
13 files changed
+479 -12

No files matched your search

+12
View File
@@ -25,6 +25,7 @@ pub struct SchemaQuery {
pub table_name_filter: Option<String>,
pub apply_visible_filter: Option<bool>,
pub client_session_id: Option<String>,
pub include_postgres_access: Option<bool>,
}
#[derive(Deserialize)]
@@ -461,6 +462,17 @@ pub async fn get_ddl(
dbx_core::schema::get_doris_catalog_table_ddl_core(&state.app, &q.connection_id, &catalog, database, table)
.await
.map_err(AppError::from)?
} else if q.include_postgres_access.unwrap_or(false) {
dbx_core::schema::get_table_display_ddl_core(
&state.app,
&q.connection_id,
database,
schema,
table,
q.object_type,
)
.await
.map_err(AppError::from)?
} else {
dbx_core::schema::get_table_ddl_core(&state.app, &q.connection_id, database, schema, table, q.object_type)
.await