CartoDB-SQL-API icon indicating copy to clipboard operation
CartoDB-SQL-API copied to clipboard

Force SQL API test suite to use English locale

Open ReaperScythe opened this issue 11 years ago • 8 comments

When running CartoDB-SQL-API "make check", PostgreSQL seems to be taking into account the host's locale. This ticket is to make it always use English locale.

ReaperScythe avatar May 07 '14 12:05 ReaperScythe

Does this work ?

LC_ALL=C LANG=C make check

strk avatar May 07 '14 13:05 strk

Had to follow these steps to reset the locales... https://wiki.debian.org/PostgreSql

andresmrm avatar May 08 '14 00:05 andresmrm

Changing server configuration is not an option. There must be a way to tell the server that the client wants to speak english. Do you still have a de-speaking server to try the above suggestion ?

strk avatar May 08 '14 06:05 strk

I tried that line before droping all configuration in this topic: https://groups.google.com/forum/#!msg/cartodb/jxjgXzpnkJo/SUUDhsEy0_MJ This line: PGUSER=postgres LC_ALL=C LANG=C make check Gave me this: http://sprunge.us/JJVG

andresmrm avatar May 08 '14 10:05 andresmrm

So that didn't work. I wonder if exporting PGOPTIONS='-c lc_messages=C' would have made a difference (too late to test for you?)

strk avatar May 08 '14 10:05 strk

Recreated the DB with my pt_BR locale, did a export PGOPTIONS='-c lc_messages=C' PGUSER=postgres make check Got the same locale errors.

andresmrm avatar May 08 '14 11:05 andresmrm

I wouldn't be so sure you can do this... all the references I found say otherwise. Maybe we could ask in freenode #postgres , I would if I knew exactly what to ask... =P

andresmrm avatar May 09 '14 12:05 andresmrm

You might be right. We actually tried that in the past to for the testsuite of postgis but I've never had confirmation of that to be any effective. I asked in #postgres but didn't get a clear answer. I guess it would take looking at the postgresql source code...

strk avatar May 09 '14 14:05 strk