Re: list files and sizes

From: richard(at)xentu(dot)com
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: list files and sizes
Date: 2016-02-20 22:29:42
Message-ID: ee0a93dff4cfe5edf138ae198d3c9171@xentu.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Killian Driscoll 2016-02-21 07:59:07 Re: Create view that retrieves both table and column comments
Previous Message Joe Conway 2016-02-20 21:59:43 Re: list files and sizes