Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could thedash "-" be included? - Mailing list pgsql-general

From joernbs
Subject Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could thedash "-" be included?
Date
Msg-id CAHqoMn-m0xrrqqKXhmAjZGo=W1jVzLGpuDnaiS0kuSfDAXS1CA@mail.gmail.com
Whole thread Raw
Responses Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Couldthe dash "-" be included?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Couldthe dash "-" be included?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
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..

best regards

Jörn Jaenecke

pgsql-general by date:

Previous
From: GPT
Date:
Subject: Re: rw_redis_fdw: SQL Errors when statement is within a function
Next
From: "David G. Johnston"
Date:
Subject: Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Couldthe dash "-" be included?