forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4b10074
committed
Disallow whole-row variables in GENERATED expressions.
This was previously allowed, but I think that was just an oversight.It's a clear violation of the rule that a generated column cannotdepend on itself or other generated columns. Moreover, because thecode was relying on the assumption that no such cross-referencesexist, it was pretty easy to crash ALTER TABLE and perhaps otherplaces. Even if you managed not to crash, you got quite unstable,implementation-dependent results.Per report from Vitaly Ustinov.Back-patch to v12 where GENERATED came in.Discussion:https://postgr.es/m/CAM_DEiWR2DPT6U4xb-Ehigozzd3n3G37ZB1+867zbsEVtYoJww@mail.gmail.com1 parent2b0ee12 commit4b10074
File tree
3 files changed
+23
-2
lines changed- src
- backend/catalog
- test/regress
- expected
- sql
3 files changed
+23
-2
lines changedLines changed: 13 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3020 | 3020 |
| |
3021 | 3021 |
| |
3022 | 3022 |
| |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
3023 | 3026 |
| |
3024 | 3027 |
| |
3025 |
| - | |
| 3028 | + | |
3026 | 3029 |
| |
3027 |
| - | |
| 3030 | + | |
3028 | 3031 |
| |
3029 | 3032 |
| |
3030 | 3033 |
| |
3031 | 3034 |
| |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
3032 | 3043 |
| |
3033 | 3044 |
| |
3034 | 3045 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
49 | 56 |
| |
50 | 57 |
| |
51 | 58 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 |
| |
21 | 24 |
| |
22 | 25 |
| |
|
0 commit comments
Comments
(0)