[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes:
> The problem here is not timezone related - it is more fundamental in that
> the stored data does not change but the expression, as time progresses, is
> going to give different values and thus make what is stored incorrect.

Right --- current_timestamp in a generation expression makes no sense.
(There's also an issue about whether the surrounding calculation
is timezone-dependent, but that could be fixed up.  Depending on
current time cannot be.)

You could create a view in which this value is an extra computed column,
but you can't do it as a stored generated column.

			regards, tom lane

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux