On 2022-08-20 17:42:27 -0500, Perry Smith wrote:
> This select is almost instant:
>
>
> WITH RECURSIVE pathname(id, parent_id, basename) AS (
> SELECT child.id, child.parent_id, child.basename
> FROM dirents child
> WHERE basename = '10732.emlx'
> UNION ALL
>
> On Aug 20, 2022, at 19:38, Christophe Pettus wrote:
>
>
>> On Aug 20, 2022, at 15:42, Perry Smith wrote:
>>
>> To rephrase, is it possible to write a view that would work from the child
>> terms out towards the ancestors?
>
> Assuming that the concern is that you want to parameterize this
> On Aug 20, 2022, at 19:38, Christophe Pettus wrote:
>
>
>
>> On Aug 20, 2022, at 15:42, Perry Smith wrote:
>>
>> To rephrase, is it possible to write a view that would work from the child
>> terms out towards the ancestors?
>
> Assuming that the concern is that you want to parameterize
> On Aug 20, 2022, at 15:42, Perry Smith wrote:
>
> To rephrase, is it possible to write a view that would work from the child
> terms out towards the ancestors?
Assuming that the concern is that you want to parameterize this predicate:
WHERE basename = '10732.emlx'
... you mig
This select is almost instant:
WITH RECURSIVE pathname(id, parent_id, basename) AS (
SELECT child.id, child.parent_id, child.basename
FROM dirents child
WHERE basename = '10732.emlx'
UNION ALL
SELECT parent.id, parent.parent_id, CONCAT(parent.basename, '/',
child.basename)
F