↑↓ 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

localtimestamp

Read the PG 18 manual

Current date and time (start of current transaction); see Section 9.9.5

Reading PG 18current·documented in 25 of 27 versions, 7.3 to 20

Signatures & examples

localtimestamp → timestamp
Current date and time (start of current transaction); see Section 9.9.5
localtimestamp → 2019-12-23 14:39:53.662522
localtimestamp ( integer ) → timestamp
Current date and time (start of current transaction), with limited precision; see Section 9.9.5
localtimestamp(2) → 2019-12-23 14:39:53.66
LOCALTIMESTAMP(precision)
CURRENT_TIME and CURRENT_TIMESTAMP deliver values with time zone; LOCALTIME and LOCALTIMESTAMP deliver values without time zone.
Version history 7
  1. 13 → 14 changed
  2. 12 → 13 changed
  3. 8.1 → 8.2 changed
  4. 8.0 → 8.1 changed
  5. 7.4 → 8.0 changed
  6. 7.3 → 7.4 changed
  7. 7.2 → 7.3 added

Definition snapshot: b7bd9cda · English manual source