fix(table): repair restored PostgreSQL table identity

Closes #10474
This commit is contained in:
t8y2 authored and t8y2 committed 2026-09-29 00:47:45 +08:00
1 parent d49f3739bf
commit 4d85afd173
3 files changed
+87 -10

No files matched your search

+2 -1
View File
@@ -66,7 +66,7 @@ import { usesAgentCursorForQuery, usesAgentCursorForTableData } from "@/lib/data
import { connectionIsDorisFamilyCatalogCapable, defaultAutoCommitForDbType, supportsClearableQuerySchema, supportsTransaction, usesOracleStickyTransactionState, usesProvenReadOnlyStickyTransactionState } from "@/lib/database/databaseFeatureSupport";
import { canInsertTableRows, canUseKeylessRowPredicate, DBX_ROWID_COLUMN, editablePrimaryKeys, shouldIncludeSyntheticRowId, usesSyntheticRowIdKey } from "@/lib/table/tableEditing";
import { TABLE_DATA_EXPORT_PAGE_SIZE } from "@/lib/table/tableDataExport";
import { tableMetaForDataTab } from "@/lib/table/tableDataTabMeta";
import { repairRestoredDataTabTableIdentity, tableMetaForDataTab } from "@/lib/table/tableDataTabMeta";
import { isDataTabMetadataLifecycleStale } from "@/lib/sidebar/dataTabOpenPolicy";
import type { SqlInsertMode } from "@/lib/export/sqlInsertMode";
import { csvNullLiteralForMode } from "@/lib/export/csvNullMode";
@@ -2426,6 +2426,7 @@ export const useQueryStore = defineStore("query", () => {
tab.autoCommit = defaultAutoCommitForDbTypeWithSetting(connection?.db_type);
} else if (tab.mode === "data" && connection) {
tab.schema = connectionObjectTreeNodeSchema(connection, tab.database, tab.schema);
repairRestoredDataTabTableIdentity(tab, effectiveDatabaseTypeForConnection(connection));
}
}
restored.tabs.forEach(initializeResultAutoSave);