Re: SQL server application porting headache

From: Giuseppe Tanzilli - CSF <g(dot)tanzilli(at)gruppocsf(dot)com>
To: Oskar Berggren <beo(at)sgs(dot)o(dot)se>, pgsql-general(at)postgresql(dot)org
Subject: Re: SQL server application porting headache
Date: 2002-06-24 07:54:37
Message-ID: 3D16D03D.9010004@gruppocsf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I had similar problem porting an old application from MySQL,
~ solved quoting table/field indentifiers in the create statements,
then made the attached patch.

The patch alter the pgsql query parsing so that you can use insensitive
case names in selects,
but the server give you resultsets with the case you used when creating
tables.

try it on pgsql 7.2, should work....

Of course I'm interested in improving it.

bye
PS the patch also adds the ability to exclude objects from pg_dump with
regular expression match.

- --
- -------------------------------------------------------
Giuseppe Tanzilli g(dot)tanzilli(at)gruppocsf(dot)com
CSF Sistemi srl phone ++39 0775 7771
Via del Ciavattino
Anagni FR
Italy

Oskar Berggren wrote:

| Oskar Berggren wrote:
|
|> I have been looking at the parser somewhat and I have located the
|> conversion to lowercase in the flex source code. It seems fairly
|> easy to do this conversion even in the case of a quoted identifier. In
|> fact, I'm just about to install a modified version of PostgreSQL. Or
|> is there some other reason this won't work?
|>
|
| Turns out things weren't so easy after all. Now apparently the ODBC
| driver tries to find the table using a case-sensitive match which
| of course fail, due to the fact that the table name is now lowercase.
|
| Would it be difficult to make PostgreSQL case insensitive for real when
| comparing identifiers? That is, the actual comparison is case
| insensitive rather than having the parser convert everything to
| lowercase. Would I have to make modifications to lots of different
| places or are the comparisons in question contained in some (small)
| part of the source code?
|
|
| regards,
| Oskar
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9FtA9XpUYkD1KGJ4RAiABAJ4xqWUdl9RBduGJLoTbcmzJvp5NFACfT7AY
30b3Go7SahQjgXJn5kkQ9MQ=
=JPty
-----END PGP SIGNATURE-----

Attachment Content-Type Size
postgresql_case_and_dump_patch_20020122 application/x-java-vm 12.4 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomisaw Kityski 2002-06-24 08:08:23 SERIAL and RULE of "ON INSERT" kind
Previous Message Alxander A. Kapralov 2002-06-24 07:15:53 problem postgresql 7.1 with command DELETE.