Re: pgbench tap tests & minor fixes.

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Nikolay Shaplov <dhyan(at)nataraj(dot)su>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench tap tests & minor fixes.
Date: 2017-09-05 06:54:52
Message-ID: alpine.DEB.2.20.1709050845280.6547@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Tom,

>>> sub pgbench($$$$$)
>
> My concern is basically about maintaining coding style consistency.

Yes, I'm fine with that. I have removed it in the v12 patch.

> reasons why it's not like that already. I do have to say that many of
> the examples I've seen look more like line noise than readable code.

Sure. I agree that the readability is debatable. The usefulness is only
that an error is raised at "compile" time instead of having a strange
behavior at runtime.

>> I run the test, figure out the number it found in the resulting
>> error message, and update the number in the source.
>
> Yeah, but then what error is all that work protecting you from?

I'm not sure I understand your point. I agree that Perl doing the counting
may hide issues. Now it is more of an incremental thing, if a test is
added the counter is upgraded accordingly, and the local consistency can
be checked.

Anyway, as some tests may have to be skipped on some platforms, it seems
that the done_testing approach is sounder. The v12 patch uses that.

Thanks for your comments.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Beena Emerson 2017-09-05 07:01:03 Re: Default Partition for Range
Previous Message Etsuro Fujita 2017-09-05 06:48:53 Copyright in partition.h and partition.c