user21068201
user21068201

Reputation: 21

Sorting text field in PostgreSQL is not sorting as expected

I have a text column in PostgreSQL that I am ordering by in ASC order and it is returning the following order:

SELECT column_A FROM table ORDER BY column_A ASC:

column_A
IKvap06:52:22.52
i.lost.all.my.tacos
IQKPb06:55:51.53

But I was expecting this:

column_A
i.lost.all.my.tacos
IKvap06:52:22.52
IQKPb06:55:51.53

Any ideas as to why/how this happening? Using locale: en_US.UTF8

I double checked the locale in the database instance to make sure it was en_US.UTF8. I can't seem figure out why I am getting this sort.

Upvotes: 2

Views: 262

Answers (0)

Related Questions