lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux - Mailing list pgsql-general

From Alexander Farber
Subject lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux
Date
Msg-id CAADeyWj9XSUf-km7tykVKp93JEcpezecCJmZ9o_uE=GygdMOqQ@mail.gmail.com
Whole thread Raw
Responses Re: lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux
List pgsql-general
Hello fellow PostgreSQL users,

does anybody else observe the problem, that calling lower() method on UTF8 cyrillic strings works on Mac and Linux for version 9.5.3, but fails on Windows 7 / 64 bit (I am using the unzippable version w/o installer)?

I am probably not providing enough information here... not sure what else to write.

Here is my code (trying to lowercase a string before saving it in 2-dim. array):


        FOR _tile IN SELECT * FROM JSONB_ARRAY_ELEMENTS(in_tiles)
        LOOP
                _letter :=  _tile->>'letter';
                _value  := (_tile->>'value')::int;
                _col    := (_tile->>'col')::int + 1;
                _row    := (_tile->>'row')::int + 1;

                RAISE NOTICE 'tile = %', _tile;

                IF NOT words_valid_tile(_letter,
                                        _value,
                                        _col,
                                        _row) THEN
                        RAISE EXCEPTION 'Invalid tile = %', _tile;
                END IF;

                IF (_letters[_col][_row] IS NOT NULL) THEN
                        RAISE EXCEPTION 'Cell already occupied %', _tile;
                END IF;
                 
                _letters[_col][_row] := lower(_letter);
                RAISE NOTICE 'letter = %', _letters[_col][_row];  -- STILL UPPERCASE
                _values[_col][_row]  := _value;

        END LOOP;

I wonder if there is a workaround for this problem on Windows

Thank you
Alex


pgsql-general by date:

Previous
From: "Charles Clavadetscher"
Date:
Subject: Re: Extract data from JSONB
Next
From: Alexander Farber
Date:
Subject: Re: lower() silently fails for 9.5.3 on Windows, but works on Mac, Linux