Re: ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: ss <shekhar(dot)paris(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist
Date: 2015-08-27 17:29:20
Message-ID: 55DF48F0.7070408@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/27/2015 06:47 AM, ss wrote:
> I have started writting query since a day on postGreS my query is :
>
> CREATE TABLE IF NOT EXISTS utilisateurs (
> SEQU_NK SERIAL PRIMARY KEY NOT NULL UNIQUE,
> UTILISATEUR_NK bigint NOT NULL,
> NOM varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '',
> PASSE varchar(40) COLLATE latin1_general_ci NOT NULL ,
> RACCOURCI varchar(5) COLLATE latin1_general_ci NOT NULL,
> DROITS varchar(4) COLLATE latin1_general_ci NOT NULL DEFAULT '....' ,
>
> CONSTRAINT UTILISATEUR_NK UNIQUE (UTILISATEUR_NK,NOM)
> ) ;
> COMMENT ON COLUMN utilisateurs.PASSE IS 'md5';
> COMMENT ON COLUMN utilisateurs.DROITS IS 'ceps';
>
> And the error is :
>
> ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist
> LINE 4: NOM varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT...
> ^
> ********** Error **********
>
> ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist
> SQL state: 42704
> Character: 143
>
> Could some one please help me ?

From what I can find latin1_general_ci is a MySQL collation:

https://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html

so on that alone I would not expect it to work.

What sort of collation are you trying to achieve?

>
>
>
> --
> View this message in context: http://postgresql.nabble.com/ERROR-collation-latin1-general-ci-for-encoding-UTF8-does-not-exist-tp5863581.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ryan King - NOAA Affiliate 2015-08-27 17:46:26 $libdir/mysql_fdw
Previous Message John R Pierce 2015-08-27 17:00:37 Re: two factor authentication for pgadmin iii