- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit3e65e77
committed
doc: Recommend ANALYZE after ALTER TABLE ... SET EXPRESSION AS.
ALTER TABLE ... SET EXPRESSION AS removes statistics for the target column,so running ANALYZE afterward is recommended. But this was previously notdocumented, even though a similar recommendation exists forALTER TABLE ... SET DATA TYPE, which also clears the column's statistics.This commit updates the documentation to include the ANALYZE recommendationfor SET EXPRESSION AS.Since v18, virtual generated columns are supported, and these columns neverhave statistics. Therefore, ANALYZE is not needed after SET DATA TYPE orSET EXPRESSION AS when used on virtual generated columns. This commit alsoupdates the documentation to clarify that ANALYZE is unnecessary in such cases.Back-patch the ANALYZE recommendation for SET EXPRESSION AS to v17where the feature was introduced, and the note about virtual generatedcolumns to v18 where those columns were added.Author: Yugo Nagata <nagata@sraoss.co.jp>Reviewed-by: Fujii Masao <masao.fujii@gmail.com>Discussion:https://postgr.es/m/20250804151418.0cf365bd2855d606763443fe@sraoss.co.jpBackpatch-through: 171 parent9b681e2 commit3e65e77
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| |||
271 | 273 | | |
272 | 274 | | |
273 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
274 | 285 | | |
275 | 286 | | |
276 | 287 | | |
| |||
0 commit comments
Comments
(0)