current_query () → textReturns the text of the currently executing query, as submitted by the client (which might contain more than one statement).
Functions / System Information Functions And Operators
current_query
Read the PG 18 manualReturns 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
Definition snapshot: b7bd9cda · English manual source