forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit849c797
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 parent77e3204 commit849c797
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 | |
---|---|---|---|
| |||
2976 | 2976 |
| |
2977 | 2977 |
| |
2978 | 2978 |
| |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
2979 | 2982 |
| |
2980 | 2983 |
| |
2981 |
| - | |
| 2984 | + | |
2982 | 2985 |
| |
2983 |
| - | |
| 2986 | + | |
2984 | 2987 |
| |
2985 | 2988 |
| |
2986 | 2989 |
| |
2987 | 2990 |
| |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
2988 | 2999 |
| |
2989 | 3000 |
| |
2990 | 3001 |
| |
|
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)