table 在 postgreSql 中的特定时间后更新

table update after certain time in postgreSql

我已经在 postgres 中创建了 table,现在我想在特定时间(例如:1 小时)后更新一行。

我看到很多问题,例如:

https://dba.stackexchange.com/questions/56424/column-auto-updated-after-24-hours-in-mysql automatically update row after certain time

但我不知道这在 Postgres 中是如何工作的,请帮助我。

PostgreSQL 本身不支持调度作业。最常见的两种解决方案涉及 pgAgent 和 cron。

pgAgent 是 "a job scheduling agent for PostgreSQL, capable of running multi-step batch/shell and SQL tasks on complex schedules."

cron 程序是一个在特定时间执行程序的系统守护进程。几乎每个操作系统都包含 cron 或类似的东西; Windows 有 Windows 个任务计划程序。