[COMMITTERS] pgsql: Add a regression test script dedicated to exercising systemview

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [COMMITTERS] pgsql: Add a regression test script dedicated to exercising systemview
Дата
Msg-id E1cYKEq-0004b3-Ln@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Add a regression test script dedicated to exercising system views.

Quite a few of our built-in system views were not exercised anywhere
in the regression tests.  This is perhaps not so exciting for the ones
that are simple projections/joins of system catalogs, but for the ones
that are wrappers for set-returning C functions, the omission translates
directly to lack of test coverage for those functions.

In many cases, the reason for the omission is that the view doesn't have
much to do with any specific SQL feature, so there's no natural place to
test it.  To remedy that, invent a new script sysviews.sql that's dedicated
to testing SRF-based views.  Move a couple of tests that did fit this
charter into the new script, and add simple "count(*)" based tests of
other views within the charter.  That's enough to ensure we at least
exercise the main code path through the SRF, although it does little to
prove that the output is sane.

More could be done here, no doubt, and I hope someone will think about
how we can test these views more thoroughly.  But this is a starting
point.

Discussion: https://postgr.es/m/19359.1485723741@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d002f16c6ec38f76d1ee97367ba6af3000d441d0

Modified Files
--------------
src/test/regress/expected/rangefuncs.out  |  16 -----
src/test/regress/expected/sysviews.out    | 113 ++++++++++++++++++++++++++++++
src/test/regress/expected/timestamptz.out |  35 ---------
src/test/regress/parallel_schedule        |   2 +-
src/test/regress/serial_schedule          |   1 +
src/test/regress/sql/rangefuncs.sql       |   2 -
src/test/regress/sql/sysviews.sql         |  48 +++++++++++++
src/test/regress/sql/timestamptz.sql      |  16 -----
8 files changed, 163 insertions(+), 70 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Make psql reject attempts to set special variables to invalidva
Следующее
От: Tom Lane
Дата:
Сообщение: [COMMITTERS] pgsql: Invent pg_hba_file_rules view to show the content ofpg_hba.conf