forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2a24ec6
committed
In the spirit of TODO item
* Add use of 'const' for varibles in source tree(which is misspelled, btw.)I went through the front-end libpq code and did so. This affects inparticular the various accessor functions (such as PQdb() andPQgetvalue()) as well as, by necessity, the internal helpers they use.I have been really thorough in that regard, perhaps some people will findit annoying that things likechar * foo = PQgetvalue(res, 0, 0)will generate a warning. On the other hand it _should_ generate one. Thisis no real compatibility break, although a few clients will have to befixed to suppress warnings. (Which again would be in the spirit of theabove TODO.)In addition I replaced some int's by size_t's and removed some warnings(and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so itactually honors the const!) and supplied a new function PQoidValue thatreturns a proper Oid type. This is only front-end stuff, none of thecommunicaton stuff was touched.The psql patch also adds some new consts to honor the new libpq situation,as well as fixes a fatal condition that resulted when using the -V(--version) option and there is no database listening.So, to summarize, the psql you should definitely put in (with or withoutthe libpq). If you think I went too far with the const-mania in libpq, letme know and I'll make adjustments. If you approve it, I will also updatethe docs. -Peter--Peter Eisentraut Sernanders vaeg 10:1151 parentc6c6030 commit2a24ec6
File tree
12 files changed
+267
-261
lines changed- src
- bin/psql
- interfaces/libpq
12 files changed
+267
-261
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
828 | 828 |
| |
829 | 829 |
| |
830 | 830 |
| |
831 |
| - | |
| 831 | + | |
832 | 832 |
| |
833 | 833 |
| |
834 | 834 |
| |
|
Lines changed: 7 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
519 | 519 |
| |
520 | 520 |
| |
521 | 521 |
| |
522 |
| - | |
523 |
| - | |
| 522 | + | |
| 523 | + | |
524 | 524 |
| |
525 | 525 |
| |
526 | 526 |
| |
| |||
587 | 587 |
| |
588 | 588 |
| |
589 | 589 |
| |
590 |
| - | |
| 590 | + | |
591 | 591 |
| |
592 | 592 |
| |
593 |
| - | |
594 |
| - | |
| 593 | + | |
595 | 594 |
| |
596 | 595 |
| |
597 | 596 |
| |
| |||
609 | 608 |
| |
610 | 609 |
| |
611 | 610 |
| |
612 |
| - | |
| 611 | + | |
613 | 612 |
| |
614 | 613 |
| |
615 | 614 |
| |
| |||
633 | 632 |
| |
634 | 633 |
| |
635 | 634 |
| |
636 |
| - | |
| 635 | + | |
637 | 636 |
| |
638 | 637 |
| |
639 | 638 |
| |
| |||
685 | 684 |
| |
686 | 685 |
| |
687 | 686 |
| |
688 |
| - | |
| 687 | + | |
689 | 688 |
| |
690 | 689 |
| |
691 | 690 |
| |
|
Lines changed: 43 additions & 31 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
37 |
| - | |
| 38 | + | |
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
| |||
80 | 81 |
| |
81 | 82 |
| |
82 | 83 |
| |
83 |
| - | |
| 84 | + | |
| 85 | + | |
84 | 86 |
| |
85 | 87 |
| |
86 | 88 |
| |
87 | 89 |
| |
88 | 90 |
| |
89 | 91 |
| |
90 |
| - | |
| 92 | + | |
91 | 93 |
| |
92 | 94 |
| |
93 | 95 |
| |
| |||
167 | 169 |
| |
168 | 170 |
| |
169 | 171 |
| |
170 |
| - | |
171 |
| - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
172 | 175 |
| |
173 | 176 |
| |
174 | 177 |
| |
175 | 178 |
| |
176 | 179 |
| |
177 | 180 |
| |
178 | 181 |
| |
179 |
| - | |
| 182 | + | |
180 | 183 |
| |
181 | 184 |
| |
182 | 185 |
| |
| |||
308 | 311 |
| |
309 | 312 |
| |
310 | 313 |
| |
311 |
| - | |
| 314 | + | |
| 315 | + | |
312 | 316 |
| |
313 | 317 |
| |
314 | 318 |
| |
315 | 319 |
| |
316 | 320 |
| |
317 |
| - | |
| 321 | + | |
318 | 322 |
| |
319 | 323 |
| |
320 | 324 |
| |
| |||
471 | 475 |
| |
472 | 476 |
| |
473 | 477 |
| |
474 |
| - | |
475 |
| - | |
476 |
| - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
477 | 482 |
| |
478 | 483 |
| |
479 | 484 |
| |
480 | 485 |
| |
481 |
| - | |
| 486 | + | |
482 | 487 |
| |
483 | 488 |
| |
484 | 489 |
| |
| |||
544 | 549 |
| |
545 | 550 |
| |
546 | 551 |
| |
547 |
| - | |
548 |
| - | |
549 |
| - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
550 | 556 |
| |
551 | 557 |
| |
552 | 558 |
| |
553 | 559 |
| |
554 | 560 |
| |
555 |
| - | |
| 561 | + | |
556 | 562 |
| |
557 | 563 |
| |
558 | 564 |
| |
| |||
652 | 658 |
| |
653 | 659 |
| |
654 | 660 |
| |
655 |
| - | |
656 |
| - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
657 | 664 |
| |
658 | 665 |
| |
659 | 666 |
| |
660 | 667 |
| |
661 | 668 |
| |
662 |
| - | |
| 669 | + | |
663 | 670 |
| |
664 | 671 |
| |
665 | 672 |
| |
| |||
747 | 754 |
| |
748 | 755 |
| |
749 | 756 |
| |
750 |
| - | |
751 |
| - | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
752 | 760 |
| |
753 | 761 |
| |
754 | 762 |
| |
755 | 763 |
| |
756 |
| - | |
| 764 | + | |
757 | 765 |
| |
758 | 766 |
| |
759 | 767 |
| |
| |||
833 | 841 |
| |
834 | 842 |
| |
835 | 843 |
| |
836 |
| - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
837 | 848 |
| |
838 | 849 |
| |
839 | 850 |
| |
840 |
| - | |
| 851 | + | |
841 | 852 |
| |
842 | 853 |
| |
843 | 854 |
| |
| |||
868 | 879 |
| |
869 | 880 |
| |
870 | 881 |
| |
871 |
| - | |
| 882 | + | |
872 | 883 |
| |
873 | 884 |
| |
874 | 885 |
| |
| |||
952 | 963 |
| |
953 | 964 |
| |
954 | 965 |
| |
955 |
| - | |
| 966 | + | |
956 | 967 |
| |
957 | 968 |
| |
958 |
| - | |
959 |
| - | |
| 969 | + | |
| 970 | + | |
960 | 971 |
| |
961 | 972 |
| |
962 | 973 |
| |
| |||
1043 | 1054 |
| |
1044 | 1055 |
| |
1045 | 1056 |
| |
1046 |
| - | |
1047 |
| - | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1048 | 1060 |
| |
1049 | 1061 |
| |
1050 | 1062 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
| 47 | + | |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| |||
66 | 67 |
| |
67 | 68 |
| |
68 | 69 |
| |
69 |
| - | |
| 70 | + | |
70 | 71 |
| |
71 | 72 |
| |
72 | 73 |
|
Lines changed: 16 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
| 43 | + | |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
| 71 | + | |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
155 |
| - | |
| 155 | + | |
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
| |||
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 |
| - | |
| 172 | + | |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
| 180 | + | |
| 181 | + | |
185 | 182 |
| |
186 | 183 |
| |
187 | 184 |
| |
| |||
509 | 506 |
| |
510 | 507 |
| |
511 | 508 |
| |
512 |
| - | |
| 509 | + | |
513 | 510 |
| |
514 |
| - | |
515 |
| - | |
| 511 | + | |
| 512 | + | |
516 | 513 |
| |
517 | 514 |
| |
518 | 515 |
| |
519 | 516 |
| |
520 | 517 |
| |
| 518 | + | |
521 | 519 |
| |
522 | 520 |
| |
523 | 521 |
| |
524 |
| - | |
525 |
| - | |
526 |
| - | |
527 |
| - | |
528 |
| - | |
529 |
| - | |
530 |
| - | |
531 | 522 |
| |
532 | 523 |
| |
533 |
| - | |
| 524 | + | |
534 | 525 |
| |
535 | 526 |
| |
536 | 527 |
| |
| |||
539 | 530 |
| |
540 | 531 |
| |
541 | 532 |
| |
542 |
| - | |
| 533 | + | |
543 | 534 |
| |
544 |
| - | |
| 535 | + | |
545 | 536 |
| |
546 | 537 |
| |
547 | 538 |
| |
| |||
569 | 560 |
| |
570 | 561 |
| |
571 | 562 |
| |
572 |
| - | |
| 563 | + | |
573 | 564 |
| |
574 | 565 |
| |
575 | 566 |
| |
576 | 567 |
| |
| 568 | + | |
577 | 569 |
| |
578 | 570 |
|
0 commit comments
Comments
(0)