0

I'm on Postgres 14.

The schema I'm using has the C.UTF-8 Collate, UTF8 Encoding and C.UTF-8 Ctype.

For some reason the query

SELECT * FROM table_name ORDER BY column_name

where column_name is of type varchar(25), will return this order:

A, B, C, D, ... a, b, c, d, ...

I have a hunch it has to do with UTF8's character table but I'm not too sure.

The preferred order would of course be:

A, a, B, b, C, c, D, d, ...

Does this have to do with how the schema is set up? And in either case, is there a way I can force it to have a custom order?

0 Answers0