How do I change 'LC_COLLATE' and 'LC_CTYPE' from an azure database for PostgreSQL?

Viewed 4686

I need to change these parameters from English_United States.1252 toPortuguese_Brazil.1252 does anyone know how to do? Thank you.

enter image description here

1 Answers

You need to set the collate and ctype parameters when you create database.

Please follow the postgresql article and try to execute below sql:

1.Create Encoding:

CREATE COLLATION "pb_PB.utf8" (lc_collate = 'Portuguese_Brazil', lc_ctype = 'Portuguese_Brazil');

2.Create DB:

CREATE DATABASE pb WITH ENCODING 'utf8' LC_COLLATE='Portuguese_Brazil' LC_CTYPE='Portuguese_Brazil' TEMPLATE=template0;

enter image description here

Or maybe you could refer to this case:

Azure PostgreSQL Server Service Collation Create Error

Related