Check query
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/rules-views.html
Description:
Please check that the condition in the query is correct.
39.2.1. How SELECT Rules Work
Similarly, the rules for shoe and shoelace are substituted into the range
table of the subquery, leading to a three-level final query tree:
SELECT shoe_ready.shoename, shoe_ready.sh_avail,
shoe_ready.sl_name, shoe_ready.sl_avail,
shoe_ready.total_avail
...
...
WHERE shoe_ready.total_avail > 2; ??? (maybe WHERE shoe_ready.total_avail
Show quoted text
= 2;)
On Friday, June 26, 2026, PG Doc comments form <noreply@postgresql.org>
wrote:
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/rules-views.html
Description:...
WHERE shoe_ready.total_avail > 2; ??? (maybe WHERE shoe_ready.total_avail= 2;)
Yes, the lack of an equal sign there is a typo.
David J.
On Sun, Jun 28, 2026 at 12:51 AM David G. Johnston
<david.g.johnston@gmail.com> wrote:
On Friday, June 26, 2026, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/rules-views.html
Description:...
WHERE shoe_ready.total_avail > 2; ??? (maybe WHERE shoe_ready.total_avail= 2;)
Yes, the lack of an equal sign there is a typo.
Yes. Very old commit dcb00495236 seems to have accidentally changed
the condition to > 2 while rewriting the example to use SQL operator
notation.
The attached patch changes it from > 2 to >= 2.
Barring any objections, I'll backpatch it to all supported branches.
Regards,
--
Fujii Masao
Attachments:
v1-0001-doc-Fix-typo-in-rule-system-view-example.patchapplication/octet-stream; name=v1-0001-doc-Fix-typo-in-rule-system-view-example.patchDownload+1-2
On 7 Jul 2026, at 02:52, Fujii Masao <masao.fujii@gmail.com> wrote:
Yes. Very old commit dcb00495236 seems to have accidentally changed
the condition to > 2 while rewriting the example to use SQL operator
notation.The attached patch changes it from > 2 to >= 2.
Barring any objections, I'll backpatch it to all supported branches.
LGTM. I reviewed the referenced commit to see if there were other similar
mistakes but found none.
--
Daniel Gustafsson