> I install postgresql with locale by
> ./configure --enable-locale
>
> and try to test strcoll() and it work in my OS' locale.
How did you test strcoll() in your OS? Can you show me the source code
of your test program?
> I add indirectory /src/backend/main/main.c for
> setlocale(LC_COLLATE,"th_TH");
>
> and then compile with gmake and install when I test to
> sort in table it sort by ASCII and it does not correct.
> I try to use strcoll() because I need to sort data follow by
> dictionary.
> Does Postgresql sort by node or string?I add strcoll() in
> /backend/lib/lispsort.c like this
> #include <locale.h>
> List *
> lisp_qsort(List *the_list,int (*compare)())
> {
> /* sort array*/
> pg_sort(nodearray, num, sizeof(List *), compare);
> add strcoll() replace compare()
> [compare is a function to compare two node]
> pg_sort(nodearray, num, sizeof(List *), strcoll);
>
> }
> But it does not work.I think lispsort.c doesn't relate with data
> sorting in table.If you have other comment please guide to me.
> Now,my problem is I don't know what file that relate with sorting
> data in table.Where I ought to add strcoll()?
I don't think you need to do those kind of things. Everything is
already in PostgreSQL including calling to strcoll().
--
Tatsuo Ishii