Re: Re: PEAR::DB and oracle question
| From: | Alexey Borzov | Date: | Tue, 09 Dec 2003 19:43:39 +0000 |
| Subject: | Re: Re: PEAR::DB and oracle question | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24315@lists.php.net to get a copy of this message | ||
Sérgio Carvalho wrote:
Just a note: If you do the query like this: select foo as bar it is normal for the server to return BAR. I know for a fact that postgresql does it. If you want to specify the case, you have to use quotes: select foo as "bar" I don't have an Oracle server nearby, so I can't test it on Oracle, but I know for a fact this is pgsql's behaviour.This is not true. From PostgreSQL docs [1]: Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case. For example, the identifiers FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" and "FOO" are different from these three and each other. (The folding of unquoted names to lower case in PostgreSQL is incompatible with the SQL standard, which says that unquoted names should be folded to upper case. Thus, foo should be equivalent to "FOO" not "foo" according to the standard. If you want to write portable applications you are advised to always quote a particular name or never quote it.) [1] http://www.postgresql.org/docs/current/interactive/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS