Fábio Zangirolami
Fábio Zangirolami

Reputation: 1956

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

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

Upvotes: 3

Views: 7496

Answers (1)

Jay Gong
Jay Gong

Reputation: 23782

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

Upvotes: 3

Related Questions