3 ms·
I'm not super well versed in this domain, but I believe Postgres columns need to be wrapped in double quotes to respect case, or else they're all treated as low
by jjice 2y ago
I'm not super well versed in this domain, but I believe Postgres columns need to be wrapped in double quotes to respect case, or else they're all treated as lower, or something along those lines?
- dboreham 2y agoI seem to recall it's a SQL thing, not just PostgreSQL, although Oracle might not follow the spec. Definitely annoying.
- mattashii 2y agoYes, SQL does specify case-folding unless quoted. However, the SQL standard prescribes the case to be folded to uppercase, while PostgreSQL folds to lowercase.
- Shorn 2y agoFor MySQL, it can depend on the OS! https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sens...
- evanelias 2y agoThat's largely only true for schema names and table names, not all identifiers. The original root cause was having schemas backed by directories, and table definitions backed by .frm files. So on a case-insensitive filesystem like on Windows or MacOS, MySQL enables corresponding case-insensitivity logic for the affected types of identifiers. For a deeper dive, see my post https://www.skeema.io/blog/2022/06/07/lower-case-table-names/ https://www.skeema.io/blog/2022/06/07/lower-case-table-names...
- deleted 2y ago[deleted]