Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c7fc86

Browse files
committed
Doc: fix example of recursive query.
Compute total number of sub-parts correctly, per jason@banfelder.netSimon RiggsDiscussion:https://postgr.es/m/166161184718.1235920.6304070286124217754@wrigleys.postgresql.org
1 parent805a397 commit8c7fc86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎doc/src/sgml/queries.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2195,7 +2195,7 @@ SELECT sum(n) FROM t;
21952195
WITH RECURSIVE included_parts(sub_part, part, quantity) AS (
21962196
SELECT sub_part, part, quantity FROM parts WHERE part = 'our_product'
21972197
UNION ALL
2198-
SELECT p.sub_part, p.part, p.quantity
2198+
SELECT p.sub_part, p.part, p.quantity * pr.quantity
21992199
FROM included_parts pr, parts p
22002200
WHERE p.part = pr.sub_part
22012201
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp