Postgres and case sensitivity

Bastiaan Olij bastiaan at
Thu Aug 21 21:14:03 EDT 2014

Hi Doug,

On 22/08/14 8:46 AM, Doug Easterbrook wrote:
> and I have to say, we don't worry about case sensitivity at all within omnis --- ......      I think this is what you want.
There is one exception to this rule which has frustrated me intently.
Dealing with a legacy product coming from DF1 days many of our older
table names and column names are mixed case.
By doing something very similar to what you described here we also have
all our table names and column names in the database lowercase and by
never using quotes around table names and column names we don't have to
worry about case issues in any generated queries as postgres will
convert them to lowercase automatically and our queries work fine.


Our code stems from native datafile days. Lists defined from file
classes are case insensitive. Say my column name is ILoveMixedCase,
Omnis has no problem with the following code:

OK message {[ivMyList.ILOVEMIXEDCASE]}

Until that is, you rewrite your code and define ivMyList using your new
tableclass and schema class as *only* columns defined from file classes
are case insensative (and I think even only if your library preferences
are set as such). Columns added to a list using $cols.$add or defined
through a schema class *are* case sensitive.

The number of times I've had (legacy) code break in unexpected places
because it was originally developed against file classes, or where I've
simply typed in the case wrong because I'm dealing with one of the older
tables in the database that mix case, without Omnis giving even as much
as a peep that I'm accessing a column that does not exist...

I wish column names in lists were always case insensitive, would save me
a bunch of headaches :)



More information about the omnisdev-en mailing list