Re: pg_ls_waldir() & pg_ls_logdir()
Dave Page <dpage@pgadmin.org>
From: Dave Page <dpage@pgadmin.org>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-16T10:09:47Z
Lists: pgsql-hackers
Attachments
- lsdir_v3.diff (text/plain) patch v3
On Thu, Mar 16, 2017 at 9:54 AM, Thomas Munro <thomas.munro@enterprisedb.com> wrote: > On Thu, Mar 16, 2017 at 10:40 PM, Dave Page <dpage@pgadmin.org> wrote: >>> + const int n = snprintf(NULL, 0, "%lld", attrib.st_size); > > I wonder what the portable printf directive is for off_t. Maybe > better to use INT64_FORMAT and cast to int64? Hmm, good point. Google seems to be saying there isn't one. Patch updated as you suggest (and I've added back in a function declaration that got lost in the rebasing of the last version). -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Add pg_ls_logdir() and pg_ls_waldir() functions.
- befd73c50f11 10.0 landed