forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd57c7a7
committed
Provide a test for variable existence in psql
"\if :{?variable_name}" will be translated to "\if TRUE" if the variableexists and "\if FALSE" otherwise. Thus it will be possible to execute codeconditionally on the existence of the variable, regardless of its value.Fabien Coelho, with some review by Robins Tharakan and some light textediting by me.Discussion:https://postgr.es/m/alpine.DEB.2.20.1708260835520.3627@lancre1 parent7148050 commitd57c7a7
File tree
6 files changed
+115
-1
lines changed- doc/src/sgml/ref
- src
- bin/psql
- fe_utils
- include/fe_utils
- test/regress
- expected
- sql
6 files changed
+115
-1
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
783 | 783 |
| |
784 | 784 |
| |
785 | 785 |
| |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
786 | 790 |
| |
787 | 791 |
| |
788 | 792 |
| |
| |||
3938 | 3942 |
| |
3939 | 3943 |
| |
3940 | 3944 |
| |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
3941 | 3951 |
| |
3942 | 3952 |
| |
3943 | 3953 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
284 | 288 |
| |
285 | 289 |
| |
286 | 290 |
| |
| |||
295 | 299 |
| |
296 | 300 |
| |
297 | 301 |
| |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
298 | 316 |
| |
299 | 317 |
| |
300 | 318 |
| |
|
Lines changed: 41 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
745 | 745 |
| |
746 | 746 |
| |
747 | 747 |
| |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
748 | 752 |
| |
749 | 753 |
| |
750 |
| - | |
| 754 | + | |
751 | 755 |
| |
752 | 756 |
| |
753 | 757 |
| |
| |||
762 | 766 |
| |
763 | 767 |
| |
764 | 768 |
| |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
765 | 780 |
| |
766 | 781 |
| |
767 | 782 |
| |
| |||
1442 | 1457 |
| |
1443 | 1458 |
| |
1444 | 1459 |
| |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + |
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
| 145 | + | |
| 146 | + | |
145 | 147 |
| |
146 | 148 |
|
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3014 | 3014 |
| |
3015 | 3015 |
| |
3016 | 3016 |
| |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
3017 | 3043 |
| |
3018 | 3044 |
| |
3019 | 3045 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
572 | 572 |
| |
573 | 573 |
| |
574 | 574 |
| |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
575 | 593 |
| |
576 | 594 |
| |
577 | 595 |
| |
|
0 commit comments
Comments
(0)