I'm porting some code from some version of Sybase to PostgreSQL. This is a C application that uses the Sybase client library. My approach is to write a translation layer that translates calls to
PQexec() (for example). That part is mostly working.
It appears that the Sybase database is set up in a case sensitive manner (with respect to database object names). For example, there is both a
WIDGET table and a
widget table. It looks like the convention in this application is that the all-uppercase names indicate the actual data tables, while the lowercase names are used as temporary tables when running some processing.
According to 4.1 Lexical Structure, "Key words and unquoted identifiers are case insensitive." I know that I can double-quote identifiers to disable automatic folding to lowercase, but I don't want to have to do that manually through the zillions of lines of code that uses this database.
Is there a way to set up PostgreSQL to disable this automatic case folding for database object identifiers?
My alternative will be to write some code that examines each SQL statement and puts double quotes around every identifier (that is not a keyword).