0

I'm building a table that stores user subscription details in Postgresql. Is there some sort of trigger function or event for when certain timestamp is reached? Example: User: A, Subscribed at: 17:00:00 11/01/2019, Expires in: 1 month Do postgresql supports something like setTimeout(1 month) or setInterval(1 month)?

I've read the postgres documentation on trigger which says that functions can be triggered only on operation (crud).

1
  • No, there’s nothing like that built in. You’ll have to handle those things separately. pgAgent may be useful Commented May 11, 2019 at 9:02

1 Answer 1

1

There is pg_cron which can handle this kind of tasks.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.