Skip site navigation (1) Skip section navigation (2)

Re: bugfix - contrib/pgbench

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: bugfix - contrib/pgbench
Date: 2005-05-23 07:43:44
Message-ID: 20050523163814.3B00.ITAGAKI.TAKAHIRO@lab.ntt.co.jp (view raw or flat)
Thread:
Lists: pgsql-patches
Neil Conway <neilc(at)samurai(dot)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(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
NTT Cyber Space Laboratories
Nippon Telegraph and Telephone Corporation.



In response to

Responses

pgsql-patches by date

Next:From: Mahmoud TaghizadehDate: 2005-05-23 07:47:21
Subject: modified farsi faq in html and txt version
Previous:From: Neil ConwayDate: 2005-05-23 05:37:53
Subject: Re: bugfix - contrib/pgbench

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group