Unanswered: Is there a way to turn off case sensitivity of the postgresql ??
Is there a way to turn off case sensitivity of the postgresql so that I can use
"select id, empname , sal from test " for convinience instead of
"select ID,EmpName,Sal from Test".
Can anyone explain why case sensitivity is required for table names and field names considering that we don't use two fields with same name in a table - one with Upper case and the other with Lower case.
It is not intuitive making it case sensitive unless there is a strong reason to make it so.
Hi Shammat, but "create table TEST (Id integer, EmpName text, sal decimal(10,8)) " would create empname and not EmpName which is more intuitive and clear.
To create EmpName we need to put this in quotes but any upper case character in the identifier tends to trouble in Pentaho Data Integration.
Well, you asked about case insensitive identifiers, not case preserving storage.
This is how the SQL standard requires it - with the exception that the standard requires unquoted names to be stored in upper case not lower case. In SQL using CamelCase is not very common and quoted identifiers should be avoided at all cost. Most people just use underscores to delimit the words: emp_name rather than empname.
But because identifiers are case insensitive, no one keeps you from writing EmpName all the time. The way it's stored in the database doesn't matter for your SQL code.