Re: PostgreSQL 7.0.2 with locale. - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: PostgreSQL 7.0.2 with locale.
Date
Msg-id 20010116232401Y.t-ishii@sra.co.jp
Whole thread Raw
List pgsql-hackers
>         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


pgsql-hackers by date:

Previous
From: selkovjr@mcs.anl.gov
Date:
Subject: Re: Re: AW: Re: GiST for 7.1 !!
Next
From: Emmanuel Charpentier
Date:
Subject: Re: MS Access vs IS NULL (was Re: [BUGS] Bug in SQL functions that use a NULL parameter directly)