Skip to content

templates query not quoted #6872

@thisismygitrepo

Description

@thisismygitrepo

Describe the bug

When clicking (+) on table in database, a simple select statement populates a cell, which is nice, however, it fails to run because pgsql, timescaledb and many many other databases are case sensitive. Can you guys please surround the table name and the schema with quotes? that should solve it and every other db is happy with it too.
PS: this also fix a massive range of other problems related to nameing (e.g. if table has a space in its name or it has a special chacarcter etc).

Please make it like SELECT * FROM "SCHEMA_NAME"."TABLE_NAME" LIMIT 100.

Image

Will you submit a PR?

  • Yes

Environment

󰕈 24.4.0 noble 󱆃 ➜ uvx marimo env
{
"marimo": "0.17.0",
"editable": false,
"location": "/home/alex/.cache/uv/archive-v0/f96v7QZbERElKNL7VOj3u/lib/python3.14/site-packages/marimo",
"OS": "Linux",
"OS Version": "6.6.87.2-microsoft-standard-WSL2",
"Processor": "x86_64",
"Python Version": "3.14.0",
"Locale": "C",
"Binaries": {
"Browser": "--",
"Node": "v24.10.0"
},
"Dependencies": {
"click": "8.3.0",
"docutils": "0.22.2",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.9",
"narwhals": "2.9.0",
"packaging": "25.0",
"psutil": "7.1.1",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.3",
"starlette": "0.48.0",
"tomlkit": "0.13.3",
"typing-extensions": "4.15.0",
"uvicorn": "0.38.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {},
"Experimental Flags": {}
}

Code to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions