How to specify capitalization for column names in pg_fetch_object? - Mailing list pgsql-php

From David McMath
Subject How to specify capitalization for column names in pg_fetch_object?
Date
Msg-id 50AA623D.9090400@stanford.edu
Whole thread Raw
Responses Re: How to specify capitalization for column names in pg_fetch_object?  (Andrew McMillan <andrew@morphoss.com>)
Re: How to specify capitalization for column names in pg_fetch_object?  (David McMath <mcdave@stanford.edu>)
List pgsql-php
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


pgsql-php by date:

Previous
From: John DeSoi
Date:
Subject: Re: Storing large files in multiple schemas: BLOB or BYTEA
Next
From: Andrew McMillan
Date:
Subject: Re: How to specify capitalization for column names in pg_fetch_object?