forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit42b0412
committed
Throw a more on-point error for functions depending on columns.
ALTER COLUMN TYPE wasn't expecting to find any pg_proc objectsdepending on the column whose type is to be altered. That indeedwasn't possible when this code was written, but it is possiblesince we introduced new-style SQL function bodies.It's about as difficult to fix this case as it is to fix dependentviews, and we've been punting on those for years, so I don't feeltoo awful about punting for functions too. (I sure wouldn't riskback-patching such code.) So just throw a more user-facing error.Also, adjust some of the existing comments to reflect that theseare all pretty much the same issue.(This patch also fixes it so we will tolerate finding such adependency during ALTER COLUMN SET EXPRESSION; in that, we neednot do anything to the function, so no error is wanted. Thatproblem is new in HEAD.)Per bug #18449 from Alexander Lakhin. Back-patch to v14 wherewe added new-style SQL functions.Discussion:https://postgr.es/m/18449-f8248467aaa294d5@postgresql.org1 parent4019285 commit42b0412
1 file changed
+30
-4
lines changedLines changed: 30 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
48 | 49 |
| |
49 | 50 |
| |
50 | 51 |
| |
| |||
14094 | 14095 |
| |
14095 | 14096 |
| |
14096 | 14097 |
| |
| 14098 | + | |
| 14099 | + | |
| 14100 | + | |
| 14101 | + | |
| 14102 | + | |
| 14103 | + | |
| 14104 | + | |
| 14105 | + | |
| 14106 | + | |
| 14107 | + | |
| 14108 | + | |
| 14109 | + | |
| 14110 | + | |
| 14111 | + | |
| 14112 | + | |
| 14113 | + | |
| 14114 | + | |
| 14115 | + | |
| 14116 | + | |
| 14117 | + | |
| 14118 | + | |
14097 | 14119 |
| |
14098 |
| - | |
| 14120 | + | |
| 14121 | + | |
| 14122 | + | |
| 14123 | + | |
| 14124 | + | |
14099 | 14125 |
| |
14100 | 14126 |
| |
14101 | 14127 |
| |
| |||
14112 | 14138 |
| |
14113 | 14139 |
| |
14114 | 14140 |
| |
14115 |
| - | |
14116 |
| - | |
14117 |
| - | |
| 14141 | + | |
| 14142 | + | |
| 14143 | + | |
14118 | 14144 |
| |
14119 | 14145 |
| |
14120 | 14146 |
| |
|
0 commit comments
Comments
(0)