forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita91e2fa
committed
Adapt hashfn.c and hashutils.h for frontend use.
hash_any() and its various variants are defined to return Datum,which is a backend-only concept, but the underlying functionsactually want to return uint32 and uint64, and only return Datumbecause it's convenient for callers who are using them toimplement a hash function for some SQL datatype.However, changing these functions to return uint32 and uint64seems like it might lead to programming errors or back-patchingdifficulties, both because they are widely used and becausefailure to use UInt{32,64}GetDatum() might not provoke acompilation error. Instead, rename the existing functions aswell as changing the return type, and add static inline wrappersfor those callers that need the previous behavior.Although this commit adapts hashutils.h and hashfn.c so that theycan be compiled as frontend code, it does not actually doanything that would cause them to be so compiled. That is leftfor another commit.Patch by me, reviewed by Suraj Kharage and Mark Dilger.Discussion:http://postgr.es/m/CA+TgmoaRiG4TXND8QuM6JXFRkM_1wL2ZNhzaUKsuec9-4yrkgw@mail.gmail.com1 parent9341c78 commita91e2fa
2 files changed
+55
-33
lines changedLines changed: 24 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
25 |
| - | |
26 | 26 |
| |
27 |
| - | |
28 | 27 |
| |
29 | 28 |
| |
30 | 29 |
| |
| |||
126 | 125 |
| |
127 | 126 |
| |
128 | 127 |
| |
129 |
| - | |
| 128 | + | |
130 | 129 |
| |
131 | 130 |
| |
132 | 131 |
| |
| |||
143 | 142 |
| |
144 | 143 |
| |
145 | 144 |
| |
146 |
| - | |
147 |
| - | |
| 145 | + | |
| 146 | + | |
148 | 147 |
| |
149 | 148 |
| |
150 | 149 |
| |
| |||
358 | 357 |
| |
359 | 358 |
| |
360 | 359 |
| |
361 |
| - | |
| 360 | + | |
362 | 361 |
| |
363 | 362 |
| |
364 | 363 |
| |
365 |
| - | |
| 364 | + | |
366 | 365 |
| |
367 | 366 |
| |
368 | 367 |
| |
369 | 368 |
| |
370 |
| - | |
| 369 | + | |
371 | 370 |
| |
372 |
| - | |
373 |
| - | |
374 |
| - | |
| 371 | + | |
| 372 | + | |
375 | 373 |
| |
376 | 374 |
| |
377 | 375 |
| |
| |||
598 | 596 |
| |
599 | 597 |
| |
600 | 598 |
| |
601 |
| - | |
| 599 | + | |
602 | 600 |
| |
603 | 601 |
| |
604 | 602 |
| |
605 |
| - | |
| 603 | + | |
606 | 604 |
| |
607 | 605 |
| |
608 |
| - | |
| 606 | + | |
609 | 607 |
| |
610 | 608 |
| |
611 |
| - | |
612 |
| - | |
| 609 | + | |
| 610 | + | |
613 | 611 |
| |
614 | 612 |
| |
615 | 613 |
| |
| |||
621 | 619 |
| |
622 | 620 |
| |
623 | 621 |
| |
624 |
| - | |
| 622 | + | |
625 | 623 |
| |
626 | 624 |
| |
627 | 625 |
| |
628 |
| - | |
| 626 | + | |
629 | 627 |
| |
630 |
| - | |
| 628 | + | |
631 | 629 |
| |
632 |
| - | |
633 |
| - | |
| 630 | + | |
| 631 | + | |
634 | 632 |
| |
635 | 633 |
| |
636 | 634 |
| |
| |||
650 | 648 |
| |
651 | 649 |
| |
652 | 650 |
| |
653 |
| - | |
| 651 | + | |
654 | 652 |
| |
655 | 653 |
| |
656 | 654 |
| |
| |||
669 | 667 |
| |
670 | 668 |
| |
671 | 669 |
| |
672 |
| - | |
673 |
| - | |
| 670 | + | |
674 | 671 |
| |
675 | 672 |
| |
676 | 673 |
| |
| |||
679 | 676 |
| |
680 | 677 |
| |
681 | 678 |
| |
682 |
| - | |
683 |
| - | |
| 679 | + | |
684 | 680 |
| |
685 | 681 |
| |
686 | 682 |
| |
| |||
692 | 688 |
| |
693 | 689 |
| |
694 | 690 |
| |
695 |
| - | |
| 691 | + | |
696 | 692 |
|
Lines changed: 31 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
| 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 | + | |
28 | 54 |
| |
29 | 55 |
| |
30 | 56 |
| |
|
0 commit comments
Comments
(0)