Re: list files and sizes - Mailing list pgsql-novice

From richard@xentu.com
Subject Re: list files and sizes
Date
Msg-id ee0a93dff4cfe5edf138ae198d3c9171@xentu.com
Whole thread Raw
In response to Re: list files and sizes  (Joe Conway <mail@joeconway.com>)
List pgsql-novice
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.


pgsql-novice by date:

Previous
From: Joe Conway
Date:
Subject: Re: list files and sizes
Next
From: Killian Driscoll
Date:
Subject: Re: Create view that retrieves both table and column comments