Postgresql is case case insensitive unless you impose a specific casing using " (double quotes): they are valid everywhere postgresql expects an identifier (schema name, table name, column name, cte name, after AS, etc.
So it's all correct. See https://docs.sqlalchemy.org/en/14/core/sqlelement.html#sqlalchemy.sql.expression.quoted_name Il ven 1 apr 2022, 04:01 oislone <oisl...@gmail.com> ha scritto: > I see. > I didn't expect it to be so simple. > I tried to debug sqlalchemy, but didn't find character conversion > It turned out to be the default way of postgreql. > Thanks for your instruction. > 'Jonathan Vanasco' via sqlalchemy 於 2022/4/1 04:47 寫道: > > I'm not aware of any recent changes in the libraries that would cause that > behavior. > > It may be how you are using the libraries or raw sql. > > PostgreSQL will convert database names to lowercase UNLESS the database > name is in quotes. > > These will all create `abc`: > > CREATE DATABASE abc; > CREATE DATABASE Abc; > CREATE DATABASE ABc; > CREATE DATABASE ABC; > CREATE DATABASE aBc; > CREATE DATABASE aBC; > CREATE DATABASE abC; > > These will create two different databases: > > CREATE DATABASE "abc"; > CREATE DATABASE "Abc"; > CREATE DATABASE "ABc"; > CREATE DATABASE "ABC"; > .. etc.. > > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sqlalchemy/89e4aa92-c9c2-767d-6caf-dc0b77477a2a%40gmail.com > <https://groups.google.com/d/msgid/sqlalchemy/89e4aa92-c9c2-767d-6caf-dc0b77477a2a%40gmail.com?utm_medium=email&utm_source=footer> > . > -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/CADKhPGTYxvQRrXeYx%2BqvQEAiSByeanHaVJFgzofEOkdhASUvLg%40mail.gmail.com.