Re: bugfix - contrib/pgbench - Mailing list pgsql-patches

From ITAGAKI Takahiro
Subject Re: bugfix - contrib/pgbench
Date
Msg-id 20050523163814.3B00.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Whole thread Raw
In response to Re: bugfix - contrib/pgbench  (Neil Conway <neilc@samurai.com>)
Responses Re: bugfix - contrib/pgbench  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> wrote:

> > --- 622,628 ----
> >       for (i = 0; i < (sizeof(DDLAFTERs) / sizeof(char *)); i++)
> >       {
> >           res = PQexec(con, DDLAFTERs[i]);
> > !         if (strncmp(DDLAFTERs[i], "drop", 4) && PQresultStatus(res) != PGRES_COMMAND_OK)
> >           {
> >               fprintf(stderr, "%s", PQerrorMessage(con));
> >               exit(1);
>
> None of the DDL in DDLAFTERs begins with "drop", so ISTM the right fix
> is to just remove the strncmp().

I certainly think so.

But this code seems to be an idiom,
"Check the result, but drop commands may be fail".
Drop commands might be added to DDLAFTERs some time, so we may leave it.

---
ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>
NTT Cyber Space Laboratories
Nippon Telegraph and Telephone Corporation.



pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: bugfix - contrib/pgbench
Next
From: Mahmoud Taghizadeh
Date:
Subject: modified farsi faq in html and txt version