Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change column collation postgresql

Tags:

postgresql

I have a database with default LC_COLLATE=C but I want to have different COLLATION to one column in my table, how to do it?

like image 978
Logovsky Dmitry Avatar asked Sep 13 '19 13:09

Logovsky Dmitry


1 Answers

You can just alter column table

ALTER TABLE users ALTER COLUMN name SET DATA TYPE character varying(255) COLLATE "en_US"
like image 146
Logovsky Dmitry Avatar answered Oct 13 '22 01:10

Logovsky Dmitry