Is there a way to configure PHP to use case-insensitive variable names?
I'd like to do this...
$dbVars = pg_query( $connection, "SELECT columnName1, columnName2,
columnName3 FROM table WHERE id=1" );
$dbVars = pg_fetch_array( $dbVars );
extract( $dbVars[0] );
echo( $columnName1 );
PostgreSQL (and MySQL, to the best of my knowledge) are
case-insensitive, so selecting columnName1 will return columnname1. In
my last project, a 60-table, year-long event, this was just a constant,
numbing (yet minor) source of frustration, and I'd like to avoid it
this next time.
My other option is to use PostgreSQL in a case-sensitive mode, but
there's no switch to just "turn on"; it requires another level of
annoying syntax within the queries, and tweaking PHP seems like a much
better solution.
(apparently PHP2 was case-insensitive, so I hope there's an INI tweak
that will restore this someplace)