Re: [PATCH] expand the units that pg_size_pretty supports on output - Mailing list pgsql-hackers

From Asif Rehman
Subject Re: [PATCH] expand the units that pg_size_pretty supports on output
Date
Msg-id 162237831692.1147.3200470226725425722.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: [PATCH] expand the units that pg_size_pretty supports on output  (David Christensen <david.christensen@crunchydata.com>)
List pgsql-hackers
The following review has been posted through the commitfest application:
make installcheck-world:  not tested
Implements feature:       not tested
Spec compliant:           not tested
Documentation:            not tested

Hi David,

I was reviewing this patch and the compilation failed with following error on CentOS 7.

dbsize.c: In function ‘pg_size_bytes’:
dbsize.c:808:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
   const int unit_count = 9; /* sizeof units table */
   ^
dbsize.c:809:3: error: variable length array ‘units’ is used [-Werror=vla]
   const char *units[unit_count] = {
   ^

I believe "unit_count" ought to be a #define here.

Regards,
Asif

The new status of this patch is: Waiting on Author

pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: [PATCH] More docs on what to do and not do in extension code
Next
From: Andreas Karlsson
Date:
Subject: Re: GISTSTATE is too large