Create collation incorrect error code

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Create collation incorrect error code
Date: 2012-05-31 18:08:16
Message-ID: CABUevEwAcRYs-tasSce4UNEX61+a=iVB3wwB44_LOWHsvZPiJg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Strangeness:

template1=# create collation "nb_NO.utf8" (locale=nb_NO.utf8);
ERROR: could not create locale "nb_no.utf8": Success

Clearly it's not successful...

On some runs, I get:

template1=# create collation "nb_NO.utf8" (locale=nb_NO.utf8);
ERROR: could not create locale "nb_no.utf8": No such file or directory
DETAIL: The operating system could not find any locale data for the
locale name "nb_no.utf8".

Which is correct.

The first one is clearly wrong. Seems there are some cases where errno
isn't set properly? But form what I can tell
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/newlocale.html)
errno should be set.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Koposov 2012-05-31 18:09:17 Re: slow dropping of tables, DropRelFileNodeBuffers, tas
Previous Message Merlin Moncure 2012-05-31 18:03:28 Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile