forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4907ba3
committed
Doc: simplify the tutorial's window-function examples.
For the purposes of this discussion, row_number() is just as goodas rank(), and its behavior is easier to understand and describe.So let's switch the examples to using row_number().Along the way to checking the results given in the tutorial,I found it helpful to extract the empsalary table we use in theregression tests, which is evidently the same data that was usedto make these results. So I shoved that into advanced.sourceto improve the coverage of that file a little. (There's stillseveral pages of the tutorial that are not included in it,but at least now 3.5 Window Functions is covered.)Suggested-by: "David G. Johnston" <david.g.johnston@gmail.com>Author: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/173737973383.1070.1832752929070067441@wrigleys.postgresql.org1 parentdb19a50 commit4907ba3
2 files changed
+71
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
416 | 418 | | |
417 | 419 | | |
418 | 420 | | |
| |||
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
530 | | - | |
| 532 | + | |
531 | 533 | | |
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
535 | 537 | | |
536 | 538 | | |
537 | | - | |
| 539 | + | |
| 540 | + | |
538 | 541 | | |
539 | 542 | | |
540 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
13 | 62 | | |
14 | 63 | | |
15 | 64 | | |
| |||
0 commit comments
Comments
(0)