Question

Is it possible to write a stored procedure or trigger that will be executed automatically inside of a database on particular time without any calls from application? If yes, then could anybody give me an example or link to some resource where I can read how to do that.

Was it helpful?

Solution

Check out pgAgent. If that doesn't work for you, there's always cron in Unix/Linux and the Task Scheduler service in Windows.

OTHER TIPS

I don't think there's anything built-in, but you might want to check out pgjobs or pgAgent.

You can use Stored Procedures. Stored Procedure is a set of statements, which allow ease and flexibility for a programmer because stored procedure is easy to execute than reissuing the number of individual SQL statements but they need to perform the same database operations.Using the stored procedure less information needs to be sent between the server and the client.

You can visit These links :-

  1. Postgres Procedures

  2. Best way to use stored Procedures

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top