pgsql: Remove special checks for pg_rewrite.ev_qual and ev_action being

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Remove special checks for pg_rewrite.ev_qual and ev_action being
Дата
Msg-id E1kZfbE-0005SI-T3@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Remove special checks for pg_rewrite.ev_qual and ev_action being NULL.

make_ruledef() and make_viewdef() were coded to cope with possible
null-ness of these columns, but they've been marked BKI_FORCE_NOT_NULL
for some time.  So there's not really any need to do more than what
we do for the other columns of pg_rewrite, i.e. just Assert that
we got non-null results.

(There is a school of thought that says Asserts aren't the thing
to do to check for corrupt data, but surely here is not the place
to start if we want such a policy.)

Also, remove long-dead-if-indeed-it-ever-wasn't-dead handling of
an empty actions list in make_ruledef().  That's an error case
and should be treated as such.  (DO INSTEAD NOTHING is represented
by a CMD_NOTHING Query, not an empty list; cf transformRuleStmt.)

Kyotaro Horiguchi, some changes by me

Discussion: https://postgr.es/m/CAEudQApoA=tMTic6xEPYP_hsNZ8XtToVThK_0x7D_aFQYowq3w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e1339bfc7a2fd4629e1c3f8f919ddd05b4745e13

Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Rethink the generation rule for fmgroids.h macros.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view.