Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL forces lowercase names?

Tags:

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.

like image 279
Wine Too Avatar asked Mar 02 '12 18:03

Wine Too


1 Answers

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" 
like image 157
mechanical_meat Avatar answered Oct 09 '22 01:10

mechanical_meat