Skip to content

feat(duckdb): connect to MotherDuck and update DuckDB to 2.0.1 - #4461

Merged
datlechin merged 4 commits into
mainfrom
feat/duckdb-motherduck
Nov 24, 2026
Merged

datlechin merged 4 commits into
mainfrom
feat/duckdb-motherduck

Conversation

@datlechin

@datlechin datlechin commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • DuckDB connection form (macOS): new Connection Type MotherDuck with Access Token (secure, Keychain) and an optional Database (empty attaches the whole workspace). Attached Databases work beside it.
  • Connect: in-memory DuckDB, LOAD motherduck, SET motherduck_token, attach mode, a motherduck_connection_timeout taken from the connect deadline, ATTACH 'md:...', then the named catalog or PRAGMA md_use_default. An empty or malformed token is refused before anything opens (no token starts MotherDuck's browser sign-in).
  • Errors named for: version refused, token rejected, extension download/check failed, MotherDuck unreachable, timeout. The extension loader no longer reinstalls and reloads after an init failure (cost ~20 s offline).
  • Safe Mode and external clients: md_/__md_ calls are writes, md_drop_/md_delete_ are destructive, and external clients (MCP, AI, URL, AppleScript) are refused md_*, get_md_token(), PRAGMA print_md_token and the other MotherDuck sign-in pragmas, prompt/embedding. Swift and Rust classifiers share the fixtures.
  • An older DuckDB plugin without the MotherDuck option refuses such a row instead of opening it as a local file.
  • md:<db> copies and pastes as a MotherDuck connection. quack:// links now open as Remote (they opened as Local File) and match saved Quack rows by host, port and alias.
  • DuckDB 2.0.1: Rust crate 1.20001.0 (Linux, Windows) with regenerated license files; Apple build scripts, header, license inventory and iOS acknowledgements. Nested union values now print as 2.0.1 prints them.
  • Rust DuckDB driver: an ATTACH of a FIFO names the path as typed, not the link-resolved one.

MotherDuck accepts DuckDB 2.0.1 server-side only from the day it enables it (measured 2026-11-23 with a real token: ATTACH 'md:' on 2.0.1 returns "not yet supported"). The full statement sequence was run against the account with DuckDB 1.5.6: workspace and single mode, default database, a local file beside it, catalog listing, a query.

Needs the maintainer:

  • Publish libs-<n> from build-duckdb.sh / build-duckdb-ios.sh at v2.0.1 (apple/RELEASING.md, Static libraries). Until then Apple builds keep DuckDB 2.0.0, whose MotherDuck extension refuses to load.
  • The DuckDB registry plugin ships with the next app tag.

Docs: TableProApp/docs#279

Before After
Before, light After, light
Before, dark After, dark

Test plan

  • TableProDuckDBCoreTests (97): MotherDuck plan, error classifier, loader init-failure stop.
  • TableProSQLGrammarTests (581) and Rust tablepro-core, tablepro-mcp: MotherDuck tiers and outside-reach, shared fixtures.
  • Rust tablepro-driver-duckdb on 2.0.1: decode::nested_values_read_as_duckdb_prints_them failed before the decode change; open_semantics::an_attach_of_a_fifo_is_refused failed on macOS before the path change.
  • Hosted (596): DriverSettingNotSupportedErrorTests, DatabaseURLConnectionMatchTests, ConnectionURLParserDuckDBTests, ConnectionURLFormatterTests, ConnectionDraftURLImportTests, TransientConnectionFactoryTests, PluginMetadataCuratedParityTests against the built DuckDB plugin, the gate and classifier suites.
  • AllPlugins and the iOS app build.

Fixes #2489

@datlechin
datlechin merged commit 6cdb499 into main Nov 24, 2026
47 checks passed
@datlechin
datlechin deleted the feat/duckdb-motherduck branch November 24, 2026 03:04
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.

MotherDuck connections

1 participant