PostgreSQL forces lowercase names?

…衆ロ難τιáo~ 提交于 2020-01-03 07:20:12

问题


Just started to learn PostgreSQL 9.1 on linux through C and libpq.
For now I check connection, connect, create database, create table and other basic stuff. But I noted that during table creating PQ converts my database name to lowercase. Then I see that table names and field names are also forced to lowercase. Howewer, when I try to connect with uppercase (original) name of database I get warning that asked database don't exist.

Best of all will be that all names stays as written. Is this possible to get with some simple method/setting?

For example:

M_122_KL0001_2011_001_0100001

will be created as m_122_kl0001_2011_001_0100001 what is not wanted for me.
Same happens with table names and field names.


回答1:


This is the default behavior of Postgres.

If you want upper- or mixed-case, you can quote the identifier e.g.:

createdb "M_122_KL0001_2011_001_0100001"


来源:https://stackoverflow.com/questions/9538668/postgresql-forces-lowercase-names

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!