On 2016-02-20 21:59, Joe Conway wrote:
>
> SELECT v.d, f.f, s.size, s.isdir
> FROM (values('pg_xlog') ) AS v(d),
> LATERAL pg_ls_dir(v.d) AS f(f),
> LATERAL pg_stat_file(v.d || '/' || f.f) as s;
Thanks Joe, that's great.
I'd been looking at LATERAL joins, wondering if they could be of use
here, but am still at the stage where the syntax looks baffling :) I'll
have a look for some tutorials.