Quoting column names, postgres and legacy databases


I’m building a Rails app that intereacts with several legacy databases,
all on Postgres 7.4 and running into a few quirky problems.

I seem to have a lot of inconsistencies w/ quoting field names in
Postgres. I’ve written another app from scratch using Postgres and
encountered quoting trouble there too. But it seemed tied to the machine
I was serving the app from. It’s now on a Windows server, without any
problems (no quoting issues and no special steps).

Currently the machine I am developing/serving on, is an Ubuntu box,
accessing a remote Postgres box (Suse). I have to “quote” field names
when using Model.find(). The columns are a mix of all capital, uppercase
and occasionally lowercase field names (not my doing) - would that have
anyhting to do w/ it ?

I’m really not sure where to look. Is this tied to Active Record, the
Postgres database or the Postgres drivers on the dev machine? I’ve
looked at the AR code and seen the quote_colum_names methods, but am not
quite sure what/where I should patch? Any help appreciated. Thanks.