Skip to content

fix(linux): keep imported ids and empty strings, batch CSV import, XLSX - #3472

Merged
datlechin merged 15 commits into
linuxfrom
fix/linux-import-export
Oct 17, 2026
Merged

datlechin merged 15 commits into
linuxfrom
fix/linux-import-export

Conversation

@datlechin

Copy link
Copy Markdown
Member
  • build_insert writes every given value except generated columns, so an imported id is kept. A generated column, a PostgreSQL GENERATED ALWAYS identity or a SQL Server IDENTITY column can't be mapped; the dialog greys it out with "The database fills this column". SQL Server's IDENTITY_INSERT is session state on a pooled connection, so it is refused rather than toggled.
  • An empty CSV field stays an empty string instead of taking the column default.
  • XLSX: an unreadable value fails the export naming the column; integers and decimals over 15 significant digits are written as text; a cell over 32,767 characters fails with a hint to use CSV; fractions of a second show; dates outside 1900 to 9999 are text; a sheet named History becomes History_.
  • SQL export: schema-qualified table, generated columns left out, identity values kept (as Copy As INSERT).
  • TSV and CSV copies no longer add a leading apostrophe.
  • Show Row as JSON: an unreadable value shows an alert naming the column instead of null.
  • CSV import parses and plans on the blocking pool, and sends multi-row VALUES statements under each engine's limits (SQL Server 1,000 rows and 2,000 parameters; ClickHouse 1,000 parameters and 8 KiB of values, since its parameters travel in the URL). Each statement adds 5 s to the save deadline. Failures name file lines; on a table without transactions the message says part may have landed.
  • ImportLedger holds the process, inhibits logout and suspend, and asks "Stop Imports?" on close.
  • A record over 4,096 fields is refused before padding; problems show inside the import dialog; Import is off when every column is Skip or the file has no rows.
  • XML: CR, and tab and newline in names, are written as character references; a control character fails the export naming the column.
  • PostgreSQL text: BC dates print as 0001-01-01 BC, offset seconds are kept.
  • Docker tests on PostgreSQL, MySQL, ClickHouse and SQL Server for identity columns and batched import, including rollback on a failing second statement.
  • Tests updated on purpose: the one that pinned skipping auto-increment values, 16-digit XLSX numbers, and the clipboard apostrophe expectations.
  • Skipped: XLSX empty string vs NULL; rust_xlsxwriter drops empty strings and the only alternative is a ="" formula.

@datlechin
datlechin merged commit b1eb585 into linux Oct 17, 2026
24 checks passed
@datlechin
datlechin deleted the fix/linux-import-export branch October 17, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant