How do I schedule an update query in PostgreSQL for Windows? -
is possible create sort of function or trigger in postgresql update columns field in regards time?
for instance today want field equal 1, in 10 hours want equal 0.
is possible?
if value function of time can calculated @ query time. 0 or 1:
select (extract(hour current_time) >= 12)::int * 1; ?column? ---------- 0
or added view:
create view v select *, (extract(hour current_time) >= 12)::int * 1 t;
Comments
Post a Comment