Re: Q: How ORDER BY is being done inetrnally?

From: "Nicolai Tufar" <ntufar(at)pisem(dot)net>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>, <devrim(at)tdmsoft(dot)com>
Subject: Re: Q: How ORDER BY is being done inetrnally?
Date: 2004-02-02 10:49:59
Message-ID: 000101c3e97a$570149d0$7a00a8c0@ntufar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>
>
> Text sorting depends on strcoll() and nothing but. See varstr_cmp().

I see, apparently sort done for "ORDER BY" clause is case-sensitive.

But problem is still there. It is about "I"-with-dot and "I"-without-dot
in Turkish again. While all UNIX programs put "I"-without-dot before
"I"-with-dot, as it should be, PostgreSQL puts it in reverse order.

I examine the code for any possible gotchas, but I am confused about
what function is being called by what. Especially that all those sort
methods and functions are not hard-coded but stored in pg_am* catalogue
tables. Could someone please explain -very briefly- what exactly is
happening when a sort is performed. A kind of stack trace: which
function
calls which one would be very appreciated.

Best regards,
Nicolai Tufar

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-02-02 14:21:42 Re: CATALOG/NOCATALOG for new users
Previous Message Fabien COELHO 2004-02-02 08:28:00 Re: Idea about better configuration options for sort memory