On 7/26/21 9:55 AM, Alban Hertroys wrote:
On 26 Jul 2021, at 17:52, Alban Hertroys wrote:
Something like this:
with recursive foo (id, parent, children_ids) as (
select id, parent, null::text
from tree t
where not exists (
select 1 from tree c where c.
On 7/26/21 9:55 AM, Alban Hertroys wrote:
On 26 Jul 2021, at 17:52, Alban Hertroys wrote:
Something like this:
with recursive foo (id, parent, children_ids) as (
select id, parent, null::text
from tree t
where not exists (
select 1 from tree c where c.
> On 26 Jul 2021, at 17:52, Alban Hertroys wrote:
> Something like this:
>
> with recursive foo (id, parent, children_ids) as (
> select id, parent, null::text
> from tree t
>where not exists (
> select 1 from tree c where c.parent = t.id
>)
> u
> On 26 Jul 2021, at 17:19, Avi Weinberg wrote:
>
> Hi,
>
> I would like to populate the children_ids column with all the ids of the
> children recursively (+ grandchildren etc.)
> If I do it top-bottom I will end up doing extra work since there is no need
> to go all levels down if I can j
On 7/26/21 9:19 AM, Avi Weinberg wrote:
Hi,
I would like to populate the children_ids column with all the ids of
the children recursively (+ grandchildren etc.)
If I do it top-bottom I will end up doing extra work since there is no
need to go all levels down if I can just compute my IMMEDIA
On 7/26/21 9:19 AM, Avi Weinberg wrote:
Hi,
I would like to populate the children_ids column with all the ids of
the children recursively (+ grandchildren etc.)
If I do it top-bottom I will end up doing extra work since there is no
need to go all levels down if I can just compute my IMMEDIA
Hi,
I would like to populate the children_ids column with all the ids of the
children recursively (+ grandchildren etc.)
If I do it top-bottom I will end up doing extra work since there is no need to
go all levels down if I can just compute my IMMEDIATE children "children_ids"
and just concaten