PostgreSQL 18 introduces VIRTUAL generated columns as the new default, computing values on-the-fly at query time instead of storing them on disk. Unlike STORED columns that existed since version 12, VIRTUAL columns save disk space but cannot be indexed. The choice between VIRTUAL and STORED depends on computation complexity,

4m read timeFrom hashrocket.com
Post cover image
Table of contents
Understanding Generated ColumnsVIRTUAL Columns in ActionPopulating Test DataChoosing the Right StrategyPerformance ConsiderationsWe Can HelpIf you enjoyed this post, check out these related articles next:

Sort: