Skip to content

gh-158215: Fix sqlite3 completer for schema names with a double quote - #158216

Open
Tony123-tech wants to merge 1 commit into
python:mainfrom
Tony123-tech:gh-158215-fix-sqlite3-completer-schema-quote
Open

Tony123-tech wants to merge 1 commit into
python:mainfrom
Tony123-tech:gh-158215-fix-sqlite3-completer-schema-quote

Conversation

@Tony123-tech

@Tony123-tech Tony123-tech commented Sep 26, 2026 •

Copy link
Copy Markdown

The schema name from PRAGMA database_list was interpolated directly
into SQL strings, so an attached database whose name contains a double
quote produced invalid SQL and _complete() raised OperationalError.

Quote the schema name as an SQL identifier, doubling embedded double
quotes, before interpolating it into the queries.

@Tony123-tech
Tony123-tech force-pushed the gh-158215-fix-sqlite3-completer-schema-quote branch from 8afa0c6 to fef09a6 Compare September 26, 2026 04:39

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just add it to existing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants