GitHub user dosubot[bot] added a comment to the discussion: Superset 6.0: 
PostgreSQL Case-Sensitive Column Names Causing Errors (Auto-Quote Identifiers 
Support?)

<!-- Answer -->
PostgreSQL treats unquoted identifiers as lowercase, so if your column names 
are mixed-case or uppercase, you must use double quotes to preserve their case 
in queries. Superset's SQL generator previously didn't always quote 
identifiers, which caused the kind of errors you're seeing.

A recent fix ([PR #35350](https://github.com/apache/superset/pull/35350)) was 
merged into Superset's master/v6.x branch. This update ensures that, for 
databases like PostgreSQL, each part of the identifier (catalog, schema, table, 
and column) is quoted separately using SQLAlchemy's quoting logic. This should 
resolve most issues with case-sensitive column names in generated SQL.

If you're still seeing errors, double-check that your Superset build includes 
this fix (merged October 2025). If not, you can manually quote column names in 
SQL Lab (e.g., `SELECT "D1DATE" FROM my_table`) as a workaround. There isn't a 
configuration toggle for auto-quoting; it's handled by the updated SQL 
generation logic.

If the problem persists even with the latest code, there may be a regression or 
a specific edge case—let us know the details so we can help further.

References:  
- [PR #35350: Proper quoting for identifiers in cross-catalog 
queries](https://github.com/apache/superset/pull/35350)  
- [Discussion on quoting reserved/mixed-case column 
names](https://github.com/apache/superset/issues/33336)


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/bd85df8a-a6ee-48e5-8452-a30f429f7073?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=PostgreSQL%20treats%20unquoted%20identifiers%20as%20lowercase%2C%20so%20if%20your%20column%20names%20are%20mixed-case%20or%20uppercase%2C%20you%20must%20use%20double%20quotes%20to%20preserve%20their%20case%20in%20queries.%20Superset%27s%20SQL%20generator%20previously%20didn%27t%20always%20quote%20identifiers%2C%20which%20caused%20the%20kind%20of%20errors%20you%27re%20seeing.%0A%0AA%20recent%20fix%20%28%5BPR%20%2335350%5D%28https%3A//github.com/apache/superset/pull/35350%29%29%20was%20merged%20into%20Superset%27s%20master/v6.x%20branch.%20This%20update%20ensures%20that%2C%20for%20databases%20like%20PostgreSQL%2C%20each%20part%20of%20the%20identifier%20%28catalog%2C%20schema%2C%20table%2C%20and%20column%29%20is%20quoted%20separately%20using%20SQLAlchemy
 
%27s%20quoting%20logic.%20This%20should%20resolve%20most%20issues%20with%20case-sensitive%20column%20names%20in%20generated%20SQL.%0A%0AIf%20you%27re%20still%20seeing%20errors%2C%20double-check%20that%20your%20Superset%20build%20includes%20this%20fix%20%28merged%20October%202025%29.%20If%20not%2C%20you%20can%20manually%20quote%20column%20names%20in%20SQL%20Lab%20%28e.g.%2C%20%60SELECT%20%22D1DATE%22%20FROM%20my_table%60%29%20as%20a%20workaround.%20There%20isn%27t%20a%20configuration%20toggle%20for%20auto-quoting%3B%20it%27s%20handled%20by%20the%20updated%20SQL%20generation%20logic.%0A%0AIf%20the%20problem%20persists%20even%20with%20the%20latest%20code%2C%20there%20may%20be%20a%20regression%20or%20a%20specific%20edge%20case%E2%80%94let%20us%20know%20the%20details%20so%20we%20can%20help%20further.%0A%0AReferences%3A%20%20%0A-%20%5BPR%20%2335350%3A%20Proper%20quoting%20for%20identifiers%20in%20cross-catalog%20queries%5D%28https%3A//github.com/apache/superset/pull/35350%29%20%20%0A-%20%
 
5BDiscussion%20on%20quoting%20reserved/mixed-case%20column%20names%5D%28https%3A//github.com/apache/superset/issues/33336%29)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36243)

GitHub link: 
https://github.com/apache/superset/discussions/36243#discussioncomment-15065686

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to