Appearance
CURRENT_QUERY()
Return the text of the query that is currently running.
CURRENT_QUERY()
The parentheses are required. For example:
premdb=# create table q as select current_query() from sys.const;
SELECT 1
premdb=# select * from q;
current_query
----------------------------------------------------------
create table q as select current_query() from sys.const;
(1 row)
Parent topic:System Functions