↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / System Information Functions And Operators

current_query

Read the PG 18 manual

Returns the text of the currently executing query, as submitted by the client (which might contain more than one statement).

Reading PG 18current·documented in 19 of 27 versions, 8.4 to 20

Signatures & examples

current_query () → text
Returns the text of the currently executing query, as submitted by the client (which might contain more than one statement).
Version history 2
  1. 12 → 13 changed
  2. 8.3 → 8.4 added

Definition snapshot: b7bd9cda · English manual source