问题
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