Unsupported versions: 8.3
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

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)