Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TaUU0-0002UN-IQ for pgsql-php@postgresql.org; Mon, 19 Nov 2012 16:46:04 +0000 Received: from smtp2.stanford.edu ([171.67.219.82] helo=smtp.stanford.edu) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TaUTx-0004S5-Rg for pgsql-php@postgresql.org; Mon, 19 Nov 2012 16:46:04 +0000 Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 0906B6465BD for ; Mon, 19 Nov 2012 08:45:55 -0800 (PST) Received: from epgy-dsk-999.Stanford.EDU (unknown [24.248.213.185]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mcdave) by smtp.stanford.edu (Postfix) with ESMTPSA id 659A0646458 for ; Mon, 19 Nov 2012 08:45:54 -0800 (PST) Message-ID: <50AA623D.9090400@stanford.edu> Date: Mon, 19 Nov 2012 10:45:49 -0600 From: David McMath User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: How to specify capitalization for column names in pg_fetch_object? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.6 (----) X-Archive-Number: 201211/1 X-Sequence-Number: 4283 Dear List, I'm converting a PHP project from using Oracle to using Postgres. Apparently, pg_fetch_object() wants to create an object with field names lowercase by default. In the Oracle analogue, they're uppercase. So all my code's "$obj->FIELD" references need to change to "$obj->field". Is there any way to tell PHP or Postgres to change the default capitalization? In Perl, I'd use DBI and set FetchHashKeyName to "NAME_uc". In PHP, we're using "DB" (not MDB2) for the database connections, and I don't see a similar-looking lever to pull on Any advice is appreciated, dave