[Solved] Saved View with a timestamp expression


I can see how this would be misleading. However, a view does not “store” data (except for materialized views, which are a different store).

A view is a query which is substituted into the query where it is used. Admittedly, it could be parsed in advance, saving a small amount of effort.

However, a function such as now() is called when a query is executed. So, the value you will see is the value when the query is run.

This is actually a little confusing, because the function now() is not called for every row. Instead, it is evaluated once when the query starts execution. However, the query in question is the query that uses the view, not the command that creates the view.

solved Saved View with a timestamp expression