Re: [GENERAL] pg_dump error - LOCALIZATION PROBLEM

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] pg_dump error - LOCALIZATION PROBLEM
Date: 2001-09-17 19:39:43
Message-ID: 5685.1000755583@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> 2. Using strcasecmp() on strings that were parsed as keywords. See CREATE
> OPERATOR, CREATE AGGREGATE, CREATE TYPE, commands/define.c.

But the real point is that they were parsed as identifiers, *not*
keywords, and therefore have already been through a locale-dependent
case conversion. (Look at what happens in scan.l after
ScanKeywordLookup fails.) Unless we can undo or short-circuit that,
it won't help to apply a correct ASCII-only comparison.

Possibly we should change the parser's Ident node type to carry both the
raw string and the downcased-as-identifier string. The latter would
serve the existing needs, the former could be used for keyword matching.

> For #2, we should export parts of ScanKeywordLookup as a generic function,
> perhaps "normalize_identifier", ...
> For #4, we need some ASCII-only strcasecmp version.

I think these are the same thing.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-09-17 19:57:03 Re: Transaction
Previous Message Mihai Gheorghiu 2001-09-17 19:30:08 Transaction

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-09-17 20:13:08 Re: Beta time
Previous Message Peter Eisentraut 2001-09-17 19:07:36 Re: [GENERAL] pg_dump error - LOCALIZATION PROBLEM