Re: Counting lines correctly in psql help displays

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Counting lines correctly in psql help displays
Дата
Msg-id CAM-w4HNv2pajLzOMVBms05+D2bSGm=gDpZHEv6P3y7Lb0hjg3g@mail.gmail.com
обсуждение исходный текст
Ответ на Counting lines correctly in psql help displays  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Counting lines correctly in psql help displays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, Sep 5, 2015 at 5:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ordinarily I might think that was overkill, but given the number of times
> that we've failed to update those counts in the past, I think this is
> definitely a worthwhile investment in maintainability.

So to preface this, this was just a silly hack that turned out to be
more effective and simpler to code than I expected. But I suspect it's
still just a silly idea and easier to do what you suggested. Also, it
seems we often get the count wrong on SQL output and elsewhere anyways
and I'm not sure we really want to make that a strict rule. Also, as
someone who doesn't really like the whole "sometimes you get a pager
sometimes you don't" thing and turns it off whenever he sees it I'm
not in the best place to judge how much work it's worth to get the
line count right.

But that said, here's a tricksy patch that triggers an assertion
failure if the expected_lines is wrong. I intended it to trigger in
the regression tests so it only checks if the pager is actually off.
It wouldn't be hard to make it always check though.

--
greg

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: PATCH: index-only scans with partial indexes
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Allow a per-tablespace effective_io_concurrency setting