default lower case of identifier

Started by jkzhaoover 19 years ago2 messages
#1jkzhao
jkzhao@pku.edu.cn

Dear hackers,

I am migrating an application program from Oracle to PostgreSQL, but one problem blocks me.

According to SQL92 standard, in Oracle, identifiers that are not double quoted are changed to upper case.

But, in PostgreSQL, identifiers that are not double quoted are changed to lower case.

So, create user "HU", then connect Oracle by HU is right;

But, create user "HU" then connect PostgreSQL by HU is wrong.

My application program is very long and has many such errors.

I'd like to know whether I can make PostgreSQL stands to the SQL92 standard by changing some PostgreSQL's code?

Thanks & Best Regards.

JK. zhao
2006-07-26

#2Qingqing Zhou
zhouqq@cs.toronto.edu
In reply to: jkzhao (#1)
Re: default lower case of identifier

""jkzhao"" <jkzhao@pku.edu.cn> wrote

But, create user "HU" then connect PostgreSQL by HU is wrong.

If you do

postgres=# create user "HU";

You will get the "HU" as you want. Usage of the quotation marks is in the
manual.

I'd like to know whether I can make PostgreSQL stands to the SQL92
standard by changing some PostgreSQL's code?

Just cite Tom's post:

The difference between what PG does and what the spec says can only be
observed when you sometimes double-quote a particular identifier and
sometimes don't. PG makes FOO, Foo, foo and "foo" the same, but
different from "FOO" or "Foo"; while the spec would have FOO, Foo, foo
and "FOO" the same but different from "foo" or "Foo".

PostgreSQL is almost there and most of the problem is on the client side.

Regards,
Qingqing