From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove special checks for pg_rewrite.ev_qual and ev_action being |
Date: | 2020-11-02 19:34:40 |
Message-ID: | E1kZfbE-0005SI-T3@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-11-03 02:12:10 | pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view. |
Previous Message | Tom Lane | 2020-11-02 16:57:36 | pgsql: Rethink the generation rule for fmgroids.h macros. |