Re: Improve error reporting in 027_stream_regress test

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Improve error reporting in 027_stream_regress test
Дата
Msg-id aTJhaKQRHbmiDmSU@paquier.xyz
обсуждение исходный текст
Ответ на Re: Improve error reporting in 027_stream_regress test  (Bilal Yavuz <byavuz81@gmail.com>)
Ответы Re: Improve error reporting in 027_stream_regress test
Список pgsql-hackers
On Thu, Dec 04, 2025 at 03:33:30PM +0300, Bilal Yavuz wrote:
> I applied these feedbacks in v5. I wanted to cover all possible cases
> so I think 0002 might be a bit more complicated than it needs to be.
>
> What do you think about the current implementation?

I'm finding that a bit bloated.  My own attempt is the attached, which
is much simpler, returning only array for the lines of @tail and
@head.  I am not sure to see the use-case in favor of enforcing the
line count for the caller of the new routine based on what's on this
thread, so I have left that out to simplify the patch.

v5 had a mistake: slurp_file() on the full diffs should be removed
once we dump only the tail and head.  It is true that 027 would add an
extra line if regression.diffs is too short when written this way, but
the information reported is the same, while keeping the code simpler
in 027.  A portion of the comment at the top of the block printing the
diffs could be removed: with the limitation of lines in place we don't
bloat the output anymore.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления: