This page in other versions: Unsupported versions: 8.3

dblink_current_query

Name

dblink_current_query -- returns the current query string

Synopsis

    dblink_current_query() returns text
   

Description

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.

Example

test=# select dblink_current_query();
      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-2016 The PostgreSQL Global Development Group