PostgreSQL中的特定时间后更新表 [英] table update after certain time in postgreSql

查看:173
本文介绍了PostgreSQL中的特定时间后更新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have create table in postgres, now i want to update one row after certain time (eg: 1 hour).

我看到很多类似的问题:

i see many question like :

https ://dba.stackexchange.com/questions/56424/column-auto-updated-after-24-hours-in-mysql
在特定时间后自动更新行

但我不知道这是如何工作的

but i dont know how this is work in Postgres, plz help me.

推荐答案

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

PostgreSQL doesn't have native support for scheduling jobs. The two most common solutions involve pgAgent and cron.

pgAgent 是 PostgreSQL的作业调度代理,能够在复杂的调度上运行多步批处理/ shell和SQL任务。

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

cron程序是一个系统守护程序,它在某些时间执行程序。几乎每个操作系统都包含cron或类似的东西。 Windows具有Windows Task Scheduler。

The cron program is a system daemon that executes programs at certain times. Almost every operating system includes cron or something like it; Windows has Windows Task Scheduler.

这篇关于PostgreSQL中的特定时间后更新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆