В письме от четверг, 7 марта 2019 г. 13:09:49 MSK пользователь Chris Travers
написал:
> We maintain an extension (https://github.com/adjust/wltree)
> which has a fixed separator (::) and allows any utf-8 character in the tree.
>
> In our case we currently use our extended tree to store user-defined
> hierarchies of labels, which might contain whitespace, Chinese, Japanese,
> or Korean characters, etc.
>
> I would love to be able to deprecate our work on this extension and
> eventually use stock ltree.
I am afraid, that if would not be possible to have ltree with custom
separator. Or we need to pass a very long way to reach there.
To have custom separator we will need some place to store it.
We can use GUC variable, and set separator for ltree globally. It might solve
some of the problems. But will get some more. If for example we dump database,
and then restore it on instance where that GUC option is not set, everything
will be brocken.
It is not opclass option (that are discussed here on the list), because
opclass options is no about parsing, but about comparing things that was
already parsed.
It is not option of an attribute (if we can have custom attribute option),
because we can have ltree as a variable, without creating an attribute...
It should be an option of ltree type itself. I have no idea how we can
implement this. And who will allow us to commit such strange thing ;-)