Re: pgbench -f and vacuum - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: pgbench -f and vacuum
Date
Msg-id 20141222.082545.1668382394710421328.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: pgbench -f and vacuum  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
> - Error to apply to the current master:

Works for me. 

$ git apply ~/pgbench-f-noexit-v2.patch 
$

Maybe git version difference or the patch file was malformed by mail
client?

> +static void executeStatement2(PGconn *con, const char *sql, const char
> *table);
> 
> I think we can use a better name like "executeStatementIfTableExists".

Point taken.

> +    if (result == NULL)
> +    {
> +        PQclear(res);
> +        return false;
> +    }
> +
> +    if (*result == 't')
> +    {
> +        PQclear(res);
> +        return false;    /* table does not exist */
> +    }
> 
> To simplify isn't better this way?
> 
> if (result == NULL || *result == 't')
> {
>     PQclear(res);
>     return false; /* table does not exists */
> }

Thanks for pointing it out.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: Proposal "VACUUM SCHEMA"
Next
From: Tomas Vondra
Date:
Subject: Re: pgbench -f and vacuum