public inbox for [email protected]  
help / color / mirror / Atom feed
Check query
5+ messages / 4 participants
[nested] [flat]

* Check query
@ 2026-06-26 14:37  PG Doc comments form <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: PG Doc comments form @ 2026-06-26 14:37 UTC (permalink / raw)
  To: [email protected]; +Cc: [email protected]

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
>= 2;)






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Check query
@ 2026-06-27 15:51  David G. Johnston <[email protected]>
  parent: PG Doc comments form <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: David G. Johnston @ 2026-06-27 15:51 UTC (permalink / raw)
  To: [email protected] <[email protected]>; [email protected] <[email protected]>

On Friday, June 26, 2026, PG Doc comments form <[email protected]>
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.


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Check query
@ 2026-07-07 00:52  Fujii Masao <[email protected]>
  parent: David G. Johnston <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Fujii Masao @ 2026-07-07 00:52 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: [email protected] <[email protected]>; [email protected] <[email protected]>

On Sun, Jun 28, 2026 at 12:51 AM David G. Johnston
<[email protected]> wrote:
>
> On Friday, June 26, 2026, PG Doc comments form <[email protected]> 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:

  [application/octet-stream] v1-0001-doc-Fix-typo-in-rule-system-view-example.patch (1.3K, ../../CAHGQGwG5_1Vn7TqreKfrWB8Yx01AqyxJxPoG1HvWMGAK0etZQw@mail.gmail.com/2-v1-0001-doc-Fix-typo-in-rule-system-view-example.patch)
  download | inline diff:
From 3da9967172d0664cf6ab49f4f3aef8161bd03347 Mon Sep 17 00:00:00 2001
From: Fujii Masao <[email protected]>
Date: Tue, 7 Jul 2026 09:44:22 +0900
Subject: [PATCH v1] doc: Fix typo in rule-system view example

Commit dcb00495236 accidentally changed the final expanded query's
condition to > 2 while rewriting the example into SQL operator notation.

The original query and the preceding rewritten forms all use >= 2,
and view expansion should preserve that qualification. This commit
changes the final condition from > 2 to >= 2.

Backpatch to all supported versions.

Reported-by: Yaroslav Saburov <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 14
---
 doc/src/sgml/rules.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml
index 7f23962f524..9f9fa978f2d 100644
--- a/doc/src/sgml/rules.sgml
+++ b/doc/src/sgml/rules.sgml
@@ -631,7 +631,7 @@ SELECT shoe_ready.shoename, shoe_ready.sh_avail,
          WHERE rsl.sl_color = rsh.slcolor
            AND rsl.sl_len_cm &gt;= rsh.slminlen_cm
            AND rsl.sl_len_cm &lt;= rsh.slmaxlen_cm) shoe_ready
- WHERE shoe_ready.total_avail &gt; 2;
+ WHERE shoe_ready.total_avail &gt;= 2;
 </programlisting>
    </para>
 
-- 
2.55.0



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Check query
@ 2026-07-07 15:00  Daniel Gustafsson <[email protected]>
  parent: Fujii Masao <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Daniel Gustafsson @ 2026-07-07 15:00 UTC (permalink / raw)
  To: Fujii Masao <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>

> On 7 Jul 2026, at 02:52, Fujii Masao <[email protected]> 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







^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Check query
@ 2026-07-08 00:08  Fujii Masao <[email protected]>
  parent: Daniel Gustafsson <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: Fujii Masao @ 2026-07-08 00:08 UTC (permalink / raw)
  To: Daniel Gustafsson <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected] <[email protected]>; [email protected] <[email protected]>

On Wed, Jul 8, 2026 at 12:01 AM Daniel Gustafsson <[email protected]> wrote:
> LGTM.  I reviewed the referenced commit to see if there were other similar
> mistakes but found none.

Thanks for the review and check! I've pushed the patch.

Regards,

-- 
Fujii Masao






^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2026-07-08 00:08 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-26 14:37 Check query PG Doc comments form <[email protected]>
2026-06-27 15:51 ` David G. Johnston <[email protected]>
2026-07-07 00:52   ` Fujii Masao <[email protected]>
2026-07-07 15:00     ` Daniel Gustafsson <[email protected]>
2026-07-08 00:08       ` Fujii Masao <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox