Turkish downcasting in PL/pgSQL

From: ntufar <ntufar(at)pisem(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Cc: devrim(at)tdmsoft(dot)com
Subject: Turkish downcasting in PL/pgSQL
Date: 2004-08-12 12:26:57
Message-ID: 1092313616.2843.42.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Your name :
Your email address :

System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.4.18) : Debian unstable
Linux 2.6.6-1-k7

PostgreSQL version (example: PostgreSQL-8.0): PostgreSQL-8.0 CVS HEAD

Compiler used (example: gcc 2.95.2) : gcc 3.3.4

Please enter a FULL description of your problem:
------------------------------------------------

Problems with Turkish locale are widely known to developers.
Another one, now in PL/pgSQL have reared it's ugly head.
Regression tests are failing at triggers, plpgsql, copy2
and rangefuncs. Examienation of regression.diff showed that
the failures were due to unrecognised statements like
BEGIN, RAISE and IF in PL/pgSQL functions. Replacing
capital "I" with lower-case "i" (BEGiN, RAiSE, iF) completely
sloves the problem.

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Apparently problem is caused by the following directive:

%option case-insensitive

on line 76 in file src/pl/plpgsql/src/scan.l

flex (flex version 2.5.4) incorporates case-insensitivity in it's
state tables because if I run flex stage with LANG=C everything
works fine. A quick and dirty fix could be implemented by placing

LANG=C
export LANG

in file src/pl/plpgsql/src/Makefile before calling flex.

A long term fix can be done by implementing a function
for keyword lookup like ScanKeywordLookup() in
src/backend/parser/keywords.c.

I would gladly prepare a patch and send it for your consideration
tomorrow morning.

Best regards,
Nicolai Tufar

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-08-12 15:32:41 Re: Turkish downcasting in PL/pgSQL
Previous Message Thomas Boudalier 2004-08-12 09:47:54 Installation on Windows Through Terminal Server

Browse pgsql-hackers by date

  From Date Subject
Next Message Kenneth Marshall 2004-08-12 13:21:17 Re: Re: We have got a serious problem with pg_clog/WAL synchronization
Previous Message Oliver Jowett 2004-08-12 11:25:03 Re: [HACKERS] SAVEPOINT syntax again