Thread: Re: ltree PostgreSQL Module

Re: ltree PostgreSQL Module

From
"John Hansen"
Date:
Oleg,

For example:

The DMOZ topic: Top/World/Español/Países/México/Referencia/Bibliotecas/Nacionales

select text2ltree(replace('Top/World/Español/Países/México/Referencia/Bibliotecas/Nacionales','/','.'));
ERROR:  syntax error at position 14 near "Ã"

I've also found that topics contain , as in the DMOZ Topic:
Top/Arts/Music/Composition/Composers/F/Fasch,_Johann_Friedrich

Kind regards

John

> -----Original Message-----
> From: Oleg Bartunov [mailto:oleg@sai.msu.su]
> Sent: Thursday, November 11, 2004 8:48 PM
> To: John Hansen
> Cc: Teodor Sigaev; Pgsql Hackers
> Subject: Re: ltree PostgreSQL Module
>
> John,
>
> On Thu, 11 Nov 2004, John Hansen wrote:
>
> > Hello folks,
> >
> > It seems that the ltree module does not support the data
> for which is
> > was (aparantly) created.
> >
> > The DMOZ data is encoded in UTF8, but ISALNUM() does not support
> > unicode characters...
> > In fact, it does not support any database encoding.
> >
> > Is there any plans to change this?
>
> it's very difficult to see your problem without any examples !
> Many people are lucky users of ltree module, so you probably
> have some other problem. Any test demonstrating your probelm
> would be very useful.
> Also, posting to mailing lists would help other people help  you.
>
> >
> > Kind Regards,
> >
> > John Hansen
> >
>
>      Regards,
>          Oleg
> _____________________________________________________________
> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> Sternberg Astronomical Institute, Moscow University (Russia)
> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
> phone: +007(095)939-16-83, +007(095)939-23-83
>
>


Re: ltree PostgreSQL Module

From
Oleg Bartunov
Date:
This message is in MIME format.  The first part should be readable text, while the remaining parts are likely
unreadablewithout MIME-aware tools.
 

---559023410-1215378052-1100180116=:23066
Content-Type: TEXT/PLAIN; charset=koi8-r; format=flowed
Content-Transfer-Encoding: 8BIT

Hmm,

I don't see the error comes from ltree module, not from 'replace' function.
Also, are you sure your postgresql setup is ok (locale issue).

On Thu, 11 Nov 2004, John Hansen wrote:

> Oleg,
>
> For example:
>
> The DMOZ topic: Top/World/Espa??ol/Pa??ses/M?©xico/Referencia/Bibliotecas/Nacionales
>
> select text2ltree(replace('Top/World/Espa??ol/Pa??ses/M?©xico/Referencia/Bibliotecas/Nacionales','/','.'));
> ERROR:  syntax error at position 14 near "?"
>
> I've also found that topics contain , as in the DMOZ Topic:
Top/Arts/Music/Composition/Composers/F/Fasch,_Johann_Friedrich
>
> Kind regards
>
> John
>
>> -----Original Message-----
>> From: Oleg Bartunov [mailto:oleg@sai.msu.su]
>> Sent: Thursday, November 11, 2004 8:48 PM
>> To: John Hansen
>> Cc: Teodor Sigaev; Pgsql Hackers
>> Subject: Re: ltree PostgreSQL Module
>>
>> John,
>>
>> On Thu, 11 Nov 2004, John Hansen wrote:
>>
>>> Hello folks,
>>>
>>> It seems that the ltree module does not support the data
>> for which is
>>> was (aparantly) created.
>>>
>>> The DMOZ data is encoded in UTF8, but ISALNUM() does not support
>>> unicode characters...
>>> In fact, it does not support any database encoding.
>>>
>>> Is there any plans to change this?
>>
>> it's very difficult to see your problem without any examples !
>> Many people are lucky users of ltree module, so you probably
>> have some other problem. Any test demonstrating your probelm
>> would be very useful.
>> Also, posting to mailing lists would help other people help  you.
>>
>>>
>>> Kind Regards,
>>>
>>> John Hansen
>>>
>>
>>      Regards,
>>          Oleg
>> _____________________________________________________________
>> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
>> Sternberg Astronomical Institute, Moscow University (Russia)
>> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
>> phone: +007(095)939-16-83, +007(095)939-23-83
>>
>>
>
    Regards,        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
---559023410-1215378052-1100180116=:23066--


Re: ltree PostgreSQL Module

From
Oleg Bartunov
Date:
This message is in MIME format.  The first part should be readable text, while the remaining parts are likely
unreadablewithout MIME-aware tools.
 

---559023410-959030623-1100184121=:25413
Content-Type: TEXT/PLAIN; charset=koi8-r; format=flowed
Content-Transfer-Encoding: 8BIT

John,

I miss about UTF-8 :) ltree doesn't supports UTF-8 yet.
    Oleg
On Thu, 11 Nov 2004, John Hansen wrote:

> Oleg,
>
> For example:
>
> The DMOZ topic: Top/World/Espa??ol/Pa??ses/M?©xico/Referencia/Bibliotecas/Nacionales
>
> select text2ltree(replace('Top/World/Espa??ol/Pa??ses/M?©xico/Referencia/Bibliotecas/Nacionales','/','.'));
> ERROR:  syntax error at position 14 near "?"
>
> I've also found that topics contain , as in the DMOZ Topic:
Top/Arts/Music/Composition/Composers/F/Fasch,_Johann_Friedrich
>
> Kind regards
>
> John
>
>> -----Original Message-----
>> From: Oleg Bartunov [mailto:oleg@sai.msu.su]
>> Sent: Thursday, November 11, 2004 8:48 PM
>> To: John Hansen
>> Cc: Teodor Sigaev; Pgsql Hackers
>> Subject: Re: ltree PostgreSQL Module
>>
>> John,
>>
>> On Thu, 11 Nov 2004, John Hansen wrote:
>>
>>> Hello folks,
>>>
>>> It seems that the ltree module does not support the data
>> for which is
>>> was (aparantly) created.
>>>
>>> The DMOZ data is encoded in UTF8, but ISALNUM() does not support
>>> unicode characters...
>>> In fact, it does not support any database encoding.
>>>
>>> Is there any plans to change this?
>>
>> it's very difficult to see your problem without any examples !
>> Many people are lucky users of ltree module, so you probably
>> have some other problem. Any test demonstrating your probelm
>> would be very useful.
>> Also, posting to mailing lists would help other people help  you.
>>
>>>
>>> Kind Regards,
>>>
>>> John Hansen
>>>
>>
>>      Regards,
>>          Oleg
>> _____________________________________________________________
>> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
>> Sternberg Astronomical Institute, Moscow University (Russia)
>> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
>> phone: +007(095)939-16-83, +007(095)939-23-83
>>
>>
>
    Regards,        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
---559023410-959030623-1100184121=:25413--


Re: ltree PostgreSQL Module

From
John Hansen
Date:
> I miss about UTF-8 :) ltree doesn't supports UTF-8 yet.

ok,. how about all the 'other' characters from us-ascii :
,.?!@#$%^&*()_+-=[]{}\|'"?><`~

these 'should' all be valid for the ltxtquery, ltree, and ltree[] types,
except maybe for . which is used as seperator (and maybe . should be
valid too, if prepended with a '\', just as you would with a regex to
make the next character a literal).

... John




Re: ltree PostgreSQL Module

From
Oleg Bartunov
Date:
On Fri, 12 Nov 2004, John Hansen wrote:

>> I miss about UTF-8 :) ltree doesn't supports UTF-8 yet.
>
> ok,. how about all the 'other' characters from us-ascii :
> ,.?!@#$%^&*()_+-=[]{}\|'"?><`~
>
> these 'should' all be valid for the ltxtquery, ltree, and ltree[] types,
> except maybe for . which is used as seperator (and maybe . should be
> valid too, if prepended with a '\', just as you would with a regex to
> make the next character a literal).

I agree with you, but Unfortunately, it's not easy and we have no time
to work on ltree now.

>
> ... John
>
>
    Regards,        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83