↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / Date/Time Functions And Operators

pg_sleep_until

Read the PG 18 manual

pg_sleep makes the current session's process sleep until the given number of seconds have elapsed.

Reading PG 18current·documented in 14 of 27 versions, 9.4 to 20

Signatures & examples

pg_sleep_until ( timestamp with time zone )
pg_sleep makes the current session's process sleep until the given number of seconds have elapsed. Fractional-second delays can be specified. pg_sleep_for is a convenience function to allow the sleep time to be specified as an interval. pg_sleep_until is a convenience function for when a specific wake-up time is desired. For example:
Version history 2
  1. 12 → 13 changed
  2. 9.3 → 9.4 added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source