Re: pgbench -f and vacuum

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench -f and vacuum
Date: 2014-12-22 16:47:37
Message-ID: 20141222164737.GC1768@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tomas Vondra wrote:
> On 22.12.2014 07:36, Tatsuo Ishii wrote:
> > On 22.12.2014 00:28, Tomas Vondra wrote:

> >> (8) Also, I think it's not necessary to define function prototypes for
> >> executeStatement2 and is_table_exists. It certainly is not
> >> consistent with the other functions defined in pgbench.c (e.g.
> >> there's no prototype for executeStatement). Just delete the two
> >> prototypes and move is_table_exists before executeStatement2.
> >
> > I think not having static function prototypes is not a good
> > custom. See other source code in PostgreSQL.
>
> Yes, but apparently pgbench.c does not do that. It's strange to have
> prototypes for just two of many functions in the file.

Whenever a function is defined before its first use, a prototype is not
mandatory, so we tend to omit them, but I'm pretty sure there are cases
where we add them anyway. I my opinion, rearranging code so that called
functions appear first just to avoid the prototype is not a very good
way to organize things, though. I haven't looked at this patch so I
don't know whether this is what's being done here.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-12-22 16:51:57 Re: Proposal "VACUUM SCHEMA"
Previous Message Andrew Gierth 2014-12-22 16:19:57 Re: Final Patch for GROUPING SETS