This project is archived and is in readonly mode.
LTree support
-
Daniele Varrazzo
I heavily use ltrees with psycopg (they are just amazing). I use them just as strings. What do you need to implement? They are read-written ok as string, and because the strict rules about the ltree path components you can safely use str.split('.') to tokenize them.
What kind of feature would you implement for an ltree object in python? I suspect an overly specialized object wouldn't add much.
-
John Woltman
I did not realize that ltrees are treated as strings so easily. My end-goal was to implement an LTree object for Django, and I thought that Psycopg would need to have special support for it as well. But since ltrees can be used as strings, Psycopg support isn't necessary.
From the Django point-of-view, I'll be adding things like childOf, parentOf, etc. methods, but that is a Django thing, and not Pyscopg-specific.
-
Daniele Varrazzo
- State changed from new to invalid
Yes, I think you won't need anything special from psycopg. If you did, feel free to reopen the ticket.