This page in other versions: Unsupported versions: 8.3



dblink_current_query -- returns the current query string


    dblink_current_query() returns text


Returns the currently executing interactive command string of the local database session, or NULL if it can't be determined. Note that this function is not really related to dblink's other functionality. It is provided since it is sometimes useful in generating queries to be forwarded to remote databases.

Return Value

Returns a copy of the currently executing query string.


test=# select dblink_current_query();
 select dblink_current_query();
(1 row)

Submit correction

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group