Is it possible to define recursive composite types in Postgres 13?
create type "t" as (
I am aware that I can use a table with a parent-child relationship. The only disadvantage is that I will need to query each nested level instead of directly accessing the nested data.
I am also aware that I can use
jsonb, but I am not sure if it can access the nested data directly without querying each nested level?
What are the other alternatives using PL/pgSQL only?
I need to access each nested level separately.