forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita2a731d
committed
Test and document the behavior of initialization cross-refs in plpgsql.
We had a test showing that a variable isn't referenceable in itsown initialization expression, nor in prior ones in the same block.It *is* referenceable in later expressions in the same block, butAFAICS there is no test case exercising that. Add one, and alsoadd some error cases.Also, document that this is possible, since the docs failed tocover the point.Per question from tomás at tuxteam. I don't feel any need toback-patch this, but we should ensure we don't break it in future.Discussion:https://postgr.es/m/20211029121435.GA5414@tuxteam.de1 parent937aafd commita2a731d
File tree
3 files changed
+76
-20
lines changed- doc/src/sgml
- src/test/regress
- expected
- sql
3 files changed
+76
-20
lines changedLines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
379 | 379 |
| |
380 | 380 |
| |
381 | 381 |
| |
382 |
| - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
383 | 393 |
| |
384 | 394 |
| |
385 | 395 |
| |
|
Lines changed: 37 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4637 | 4637 |
| |
4638 | 4638 |
| |
4639 | 4639 |
| |
4640 |
| - | |
4641 |
| - | |
| 4640 | + | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
| 4646 | + | |
| 4647 | + | |
| 4648 | + | |
| 4649 | + | |
| 4650 | + | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + | |
| 4658 | + | |
| 4659 | + | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + | |
| 4663 | + | |
| 4664 | + | |
| 4665 | + | |
| 4666 | + | |
| 4667 | + | |
| 4668 | + | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
4642 | 4673 |
| |
4643 | 4674 |
| |
4644 | 4675 |
| |
4645 | 4676 |
| |
| 4677 | + | |
4646 | 4678 |
| |
4647 |
| - | |
| 4679 | + | |
4648 | 4680 |
| |
4649 | 4681 |
| |
4650 |
| - | |
4651 |
| - | |
4652 |
| - | |
4653 |
| - | |
4654 |
| - | |
4655 |
| - | |
4656 |
| - | |
4657 |
| - | |
| 4682 | + | |
| 4683 | + | |
4658 | 4684 |
| |
4659 | 4685 |
| |
4660 | 4686 |
| |
|
Lines changed: 28 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3795 | 3795 |
| |
3796 | 3796 |
| |
3797 | 3797 |
| |
3798 |
| - | |
| 3798 | + | |
3799 | 3799 |
| |
3800 |
| - | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
| 3819 | + | |
| 3820 | + | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
3801 | 3824 |
| |
3802 | 3825 |
| |
3803 | 3826 |
| |
3804 | 3827 |
| |
| 3828 | + | |
3805 | 3829 |
| |
3806 |
| - | |
| 3830 | + | |
3807 | 3831 |
| |
3808 | 3832 |
| |
3809 |
| - | |
3810 |
| - | |
3811 |
| - | |
3812 |
| - | |
3813 |
| - | |
| 3833 | + | |
3814 | 3834 |
| |
3815 | 3835 |
| |
3816 | 3836 |
| |
|
0 commit comments
Comments
(0)