forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit20e5810
committed
Separate equalRowTypes() from equalTupleDescs()
This introduces a new function equalRowTypes() that is effectively asubset of equalTupleDescs() but only compares the number of attributesand attribute name, type, typmod, and collation. This is enough formost existing uses of equalTupleDescs(), which are changed to use thenew function. The only remaining callers of equalTupleDescs() arethose that really want to check the full tuple descriptor as such,without concern about record or row or record type semantics.The existing function hashTupleDesc() is renamed to hashRowType(),because it now corresponds more to equalRowTypes().The purpose of this change is to be clearer about the semantics of theequality asked for by each caller. (At least one caller had a commentthat questioned whether equalTupleDescs() was too restrictive.) Forexample,4f62250 removed attstattarget from the tuple descriptorstructure. It was not fully clear at the time how this should affectequalTupleDescs(). Now the answer is clear: By their own definitions,equalRowTypes() does not care, and equalTupleDescs() just compareswhatever is in the tuple descriptor but does not care why it is inthere.Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>Discussion:https://www.postgresql.org/message-id/flat/f656d6d9-6660-4518-a006-2f65cafbebd1%40eisentraut.org1 parentb783186 commit20e5810
File tree
7 files changed
+79
-32
lines changed- src
- backend
- access/common
- catalog
- commands
- utils/cache
- include/access
7 files changed
+79
-32
lines changedLines changed: 60 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
414 | 414 |
| |
415 | 415 |
| |
416 | 416 |
| |
417 |
| - | |
418 |
| - | |
419 |
| - | |
420 |
| - | |
421 |
| - | |
422 | 417 |
| |
423 | 418 |
| |
424 | 419 |
| |
| |||
431 | 426 |
| |
432 | 427 |
| |
433 | 428 |
| |
| 429 | + | |
| 430 | + | |
434 | 431 |
| |
435 | 432 |
| |
436 | 433 |
| |
| |||
561 | 558 |
| |
562 | 559 |
| |
563 | 560 |
| |
564 |
| - | |
565 |
| - | |
| 561 | + | |
566 | 562 |
| |
567 |
| - | |
568 |
| - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
569 | 617 |
| |
570 |
| - | |
571 |
| - | |
| 618 | + | |
| 619 | + | |
572 | 620 |
| |
573 | 621 |
| |
574 |
| - | |
| 622 | + | |
575 | 623 |
| |
576 | 624 |
| |
577 | 625 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
437 | 437 |
| |
438 | 438 |
| |
439 | 439 |
| |
440 |
| - | |
| 440 | + | |
441 | 441 |
| |
442 | 442 |
| |
443 | 443 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1581 | 1581 |
| |
1582 | 1582 |
| |
1583 | 1583 |
| |
1584 |
| - | |
1585 |
| - | |
| 1584 | + | |
| 1585 | + | |
1586 | 1586 |
| |
1587 | 1587 |
| |
1588 | 1588 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
| 33 | + | |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
| |||
258 | 258 |
| |
259 | 259 |
| |
260 | 260 |
| |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
265 | 265 |
| |
266 | 266 |
| |
267 |
| - | |
| 267 | + | |
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
727 | 727 |
| |
728 | 728 |
| |
729 | 729 |
| |
730 |
| - | |
731 |
| - | |
| 730 | + | |
732 | 731 |
| |
733 | 732 |
| |
734 | 733 |
| |
| |||
739 | 738 |
| |
740 | 739 |
| |
741 | 740 |
| |
742 |
| - | |
| 741 | + | |
743 | 742 |
| |
744 | 743 |
| |
745 | 744 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
150 |
| - | |
| 150 | + | |
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
| |||
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 |
| - | |
| 234 | + | |
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
| |||
249 | 249 |
| |
250 | 250 |
| |
251 | 251 |
| |
252 |
| - | |
| 252 | + | |
253 | 253 |
| |
254 | 254 |
| |
255 | 255 |
| |
| |||
1927 | 1927 |
| |
1928 | 1928 |
| |
1929 | 1929 |
| |
1930 |
| - | |
| 1930 | + | |
1931 | 1931 |
| |
1932 | 1932 |
| |
1933 | 1933 |
| |
| |||
1939 | 1939 |
| |
1940 | 1940 |
| |
1941 | 1941 |
| |
1942 |
| - | |
| 1942 | + | |
1943 | 1943 |
| |
1944 | 1944 |
| |
1945 | 1945 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
130 |
| - | |
| 129 | + | |
| 130 | + | |
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
|
0 commit comments
Comments
(0)