Selecting direct children with Postgres ltree using Elixir Selecting direct children with Postgres ltree using Elixir postgresql postgresql

Selecting direct children with Postgres ltree using Elixir


Figured this out.

The documentation on Postgres states that the {} in an lquery limits the number of labels it will match, the documentation from the developers clarifies that this is actually to limit the number of levels to search.

'My.Example.*{1}'

That will match anything one level below a path starting with My.Example