Q: How ORDER BY is being done inetrnally?

From: "Nicolai Tufar" <ntufar(at)pisem(dot)net>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Q: How ORDER BY is being done inetrnally?
Date: 2004-02-02 00:15:20
Message-ID: 001301c3e921$ac74bc70$7a00a8c0@ntufar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

We are trying to fix another problem we have with Turkish locale.
Order in which tuples are returned by SELECT .. ORDER BY .
statement differs from the one returned by UNIX sort utility or
what strcoll() function will suggest. It is specific to a locale so
you will not likely be able to reproduce it.

I understand that with ORDER BY clause, values are compared
in case-insensitive manner as well as it should be the case with
the values stored in indices. And I suspect that problem is hidden
somewhere there.

I tried to find where this conversion and comparison is being done
in source code but could not, despite all my efforts. I would very
much appreciate if someone would point out what functions are
being called while sorting data for return for ORDER BY clause.

Thanks in advance,
Nicolai Tufar

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-02-02 00:44:32 Re: fork/exec
Previous Message Claudio Natoli 2004-02-02 00:11:16 Re: fork/exec