RE: database collation "C" and "C.LATIN1"

From: "James Pang (chaolpan)" <chaolpan(at)cisco(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: RE: database collation "C" and "C.LATIN1"
Date: 2023-03-09 08:31:25
Message-ID: PH0PR11MB51911F9E21AB40CEE460886DD6B59@PH0PR11MB5191.namprd11.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

The sorting order behavior is same ,right?

-----Original Message-----
From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Sent: Thursday, March 9, 2023 4:30 PM
To: James Pang (chaolpan) <chaolpan(at)cisco(dot)com>; pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: database collation "C" and "C.LATIN1"

On Thu, 2023-03-09 at 08:22 +0000, James Pang (chaolpan) wrote:
> We create one database with collate= “C.LATIN1”, any difference between “C” and “C.LATIN1” ?
> database encoding is “LATIN1”.
>  
> oid  |        collname        | collencoding |   collcollate    |   
> collctype     | collversion
> -------+------------------------+--------------+------------------+------------------+-------------
>   950 | C                      |           -1 | C                | C                |
> 12328 | C.latin1               |            8 | C.latin1         | C.latin1     |

The difference is a technicality: "C" is encoding agnostic (-1) and can be used with any encoding, while "C.latin1" can only be used with encoding LATIN1 (8).
The behavior is the same.

Yours,
Laurenz Albe

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message James Pang (chaolpan) 2023-03-09 08:37:41 RE: database collation "C" and "C.LATIN1"
Previous Message Laurenz Albe 2023-03-09 08:29:43 Re: database collation "C" and "C.LATIN1"