Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?

2018-10-28 Thread joernbs
Hello David,

I think this is a misunderstanding.
The seperator in ltree is the dot (.) , of cause I did not asked to change
that.
I asked about to expand allowed characters in the ltree-string [A-Za-z0-9_]
to [a-zA-Z0-9_/- ] including dash(-), slash(/) and whitespace( ), common
charcaters in wording or real path-names to be transformed into and from
ltree.

Jörn

Am Sa., 27. Okt. 2018 um 18:14 Uhr schrieb David G. Johnston <
david.g.johns...@gmail.com>:

> On Saturday, October 27, 2018, joernbs  wrote:
>
>> Dear friends,
>>
>> I would like to use ltree for search paths in a warehouse application,
>> something like "Material-Entry-01.Main-Aisle.Shelf-Aisle-R07/R08.R07-12-03"
>> Unfortunately I can not use common separators like dash (-) or slash(/)
>>
>> Documentation states only thes characters [A-Za-z0-9_] are allowed.
>> https://www.postgresql.org/docs/10/static/ltree.html
>>
>
> I don’t see how this would be possible to do with the existing type - too
> much potential breakage of existing data.  Your example itself shows why
> using dash as a separator is a bad idea.
>
> David J.
>
>


Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?

2018-10-27 Thread Alban Hertroys


> On 27 Oct 2018, at 18:14, David G. Johnston  
> wrote:
> 
>> On Saturday, October 27, 2018, joernbs  wrote:
>> Dear friends,
>> 
>> I would like to use ltree for search paths in a warehouse application, 
>> something like "Material-Entry-01.Main-Aisle.Shelf-Aisle-R07/R08.R07-12-03"
>> Unfortunately I can not use common separators like dash (-) or slash(/) 
>> 
>> Documentation states only thes characters [A-Za-z0-9_] are 
>> allowed.https://www.postgresql.org/docs/10/static/ltree.html
>> 
> I don’t see how this would be possible to do with the existing type - too 
> much potential breakage of existing data.  Your example itself shows why 
> using dash as a separator is a bad idea.

David,

I don't think he's talking about separators ;)

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.




Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?

2018-10-27 Thread David G. Johnston
On Saturday, October 27, 2018, joernbs  wrote:

> Dear friends,
>
> I would like to use ltree for search paths in a warehouse application,
> something like "Material-Entry-01.Main-Aisle.
> Shelf-Aisle-R07/R08.R07-12-03"
> Unfortunately I can not use common separators like dash (-) or slash(/)
>
> Documentation states only thes characters [A-Za-z0-9_] are allowed.
> https://www.postgresql.org/docs/10/static/ltree.html
>

I don’t see how this would be possible to do with the existing type - too
much potential breakage of existing data.  Your example itself shows why
using dash as a separator is a bad idea.

David J.


Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?

2018-10-27 Thread joernbs
Dear friends,

I would like to use ltree for search paths in a warehouse application,
something like "Material-Entry-01.Main-Aisle.Shelf-Aisle-R07/R08.R07-12-03"
Unfortunately I can not use common separators like dash (-) or slash(/)

Documentation states only thes characters [A-Za-z0-9_] are allowed.
https://www.postgresql.org/docs/10/static/ltree.html

As far as I can see this limitation is set in source code of ltree, line 83:
https://doxygen.postgresql.org/ltree_8h_source.html
#define ISALNUM(x) ( t_isalpha(x) || t_isdigit(x) || ( pg_mblen(x) == 1 &&
t_iseq((x), '_') ) )

I would appreciate if at least the dash (-) and perhaps also the slash(/)
would be included to the list of allowed characters.

It is not only me, also other users are interested in this feature, some of
them even changed the source code themselves to recompile their own
Postgresql version..
https://stackoverflow.com/questions/29887093/valid-characters-in-postgres-ltree-label-in-utf8-charset/34057357

best regards

Jörn Jaenecke