↑↓ 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 makes the current session's process sleep until the given number of seconds have elapsed.

Reading PG 18current·documented in 21 of 27 versions, 8.2 to 20

Signatures & examples

pg_sleep ( double precision )
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 3
  1. 12 → 13 changed
  2. 9.3 → 9.4 changed
  3. 8.1 → 8.2 added

Definition snapshot: b7bd9cda · English manual source