Site icon Database Tutorials

PostgreSQL pg_sleep

In today’s article, we will learn how to use the pg_sleep() function to delay execution for a given number of seconds in PostgreSQL.

For example, you need to run a process after half an hour.

You can use the pg_sleep() function for this.

We need to give the pg_sleep() function a value in seconds.

The syntax is quite simple:

Example usage is as follows.

Exit mobile version