Re: [HACKERS] File not found error on creating collation

2011-09-20 Thread Thom Brown
On 20 September 2011 18:25, Tom Lane wrote: > Thom Brown writes: >> On 20 September 2011 17:45, Tom Lane wrote: >>> BTW, on examining the code I note that we're doing something else that >>> promotes the confusion of "bad locale name" with "bad file name": we're >>> using errcode_for_file_access

Re: [HACKERS] File not found error on creating collation

2011-09-20 Thread Tom Lane
Thom Brown writes: > On 20 September 2011 17:45, Tom Lane wrote: >> BTW, on examining the code I note that we're doing something else that >> promotes the confusion of "bad locale name" with "bad file name": we're >> using errcode_for_file_access() to select the SQLSTATE.  If we don't >> believe

Re: [HACKERS] File not found error on creating collation

2011-09-20 Thread Thom Brown
On 20 September 2011 17:45, Tom Lane wrote: > Thom Brown writes: >> [ unhelpful reporting of ENOENT from newlocale() ] > > BTW, on examining the code I note that we're doing something else that > promotes the confusion of "bad locale name" with "bad file name": we're > using errcode_for_file_acce

Re: [HACKERS] File not found error on creating collation

2011-09-20 Thread Tom Lane
Thom Brown writes: > [ unhelpful reporting of ENOENT from newlocale() ] BTW, on examining the code I note that we're doing something else that promotes the confusion of "bad locale name" with "bad file name": we're using errcode_for_file_access() to select the SQLSTATE. If we don't believe that

Re: [HACKERS] File not found error on creating collation

2011-09-20 Thread Tom Lane
Thom Brown writes: > On 20 September 2011 05:20, Tom Lane wrote: >> Robert Haas writes: >>> Maybe something like this? >>> HINT: The operating system was unable to find any locale data for the >>> locale name you specified. >> Hmm, that's not bad. We could probably even call it errdetail, sinc

Re: [HACKERS] File not found error on creating collation

2011-09-20 Thread Thom Brown
On 20 September 2011 05:20, Tom Lane wrote: > Robert Haas writes: >> On Mon, Sep 19, 2011 at 10:04 PM, Tom Lane wrote: >>> We could possibly add a HINT suggesting that the locale isn't installed, >>> but I don't see that we could offer any useful generic advice about how >>> to install it.  I'm

Re: [HACKERS] File not found error on creating collation

2011-09-19 Thread Tom Lane
Robert Haas writes: > On Mon, Sep 19, 2011 at 10:04 PM, Tom Lane wrote: >> We could possibly add a HINT suggesting that the locale isn't installed, >> but I don't see that we could offer any useful generic advice about how >> to install it. I'm also worried about how to phrase the hint to cover

Re: [HACKERS] File not found error on creating collation

2011-09-19 Thread Robert Haas
On Mon, Sep 19, 2011 at 10:04 PM, Tom Lane wrote: > Marti Raudsepp writes: >> On Tue, Sep 20, 2011 at 03:24, Thom Brown wrote: >>> ERROR:  could not create locale "sr_SB.utf8": No such file or directory >>> It's correct in that it shouldn't be able to create the locale since >>> it's not install

Re: [HACKERS] File not found error on creating collation

2011-09-19 Thread Tom Lane
Marti Raudsepp writes: > On Tue, Sep 20, 2011 at 03:24, Thom Brown wrote: >> ERROR:  could not create locale "sr_SB.utf8": No such file or directory >> It's correct in that it shouldn't be able to create the locale since >> it's not installed, but what file can't it find?  What is the user >> s

Re: [HACKERS] File not found error on creating collation

2011-09-19 Thread Marti Raudsepp
On Tue, Sep 20, 2011 at 03:24, Thom Brown wrote: > ERROR:  could not create locale "sr_SB.utf8": No such file or directory > > It's correct in that it shouldn't be able to create the locale since > it's not installed, but what file can't it find?  What is the user > supposed to do with this messag

[HACKERS] File not found error on creating collation

2011-09-19 Thread Thom Brown
Hi, I don't find the following error message very helpful: =# create collation "sr_SP" (LOCALE ='sr_SB.utf8'); ERROR: could not create locale "sr_SB.utf8": No such file or directory It's correct in that it shouldn't be able to create the locale since it's not installed, but what file can't it