↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / Functions

pg_sleep_for

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:

English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

group
datetime
group label
时间/日期函数和操作符
lang
en
layout
table-new
pages
functions-datetime.html
prose only
false

Definition PG 18

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:

Signatures and overloads

pg_sleep_for ( interval )
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:

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"8c5053713aeaacfbe4cb00effc61f10d457c98b2a29c724b10b93819a087ea95","version":"18.7"},{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"c3efdd1c3df6795c73dfea2ecec17ca31ff37da23d758083a581d75445851f0c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:4314f90678762c8db279366bf0d25a2ac5d444d97910b8f17aa7140c692b39bb

Text language: en · wiki-repair-20261023:4314f90678762c8db279366bf0d25a2ac5d444d97910b8f17aa7140c692b39bb