From: | Bjørn T Johansen <btj(at)havleik(dot)no> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Collation problem? |
Date: | 2015-04-26 10:39:15 |
Message-ID: | 20150426123915.2c8732e0@pennywise2.havleik.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, 26 Apr 2015 11:48:37 +0200
Oliver Elphick <olly(at)lfix(dot)co(dot)uk> wrote:
> On Sun, 2015-04-26 at 11:09 +0200, Bjørn T Johansen wrote:
> > Ok, tried to run:
> >
> > alter table medlem alter column fornavn varchar(50) collate nb_NO.utf8
> >
> > But I just get:
> >
> > [Error Code: 0, SQL State: 42601] ERROR: syntax error at or near "varchar"
> > (tried without the varchar also..)
>
> ALTER [ COLUMN ] column_name [ SET DATA ] TYPE data_type [ COLLATE
> collation ] [ USING expression ]
>
>
> You need to add the TYPE key word, I think.
>
> Oliver Elphick
>
>
>
Tried that to but got the same error..
But I think I need to create the collation in the database, but I am trying to run the following statement:
CREATE COLLATION nb_NO (LOCALE = nb_NO.utf8)
But then I get this:
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".
I am using Fedora 21 and running locale -a shows these among the locales:
nb_NO
nb_NO.iso88591
nb_NO.utf8
What am I missing? I see the error message from pgsql shows the country code using lowercase, is that the problem?
Any ideas?
BTJ
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2015-04-26 10:43:57 | Re: Collation problem? |
Previous Message | Oliver Elphick | 2015-04-26 09:48:37 | Re: Collation problem? |