dblink_current_query

Name

dblink_current_query -- returns the current query string

Synopsis

 dblink_current_query () RETURNS text
   

Inputs

None

Outputs

Returns test -- a copy of the currenty executing query

Example

 test=# select dblink_current_query() from (select dblink('dbname=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
                                                                 dblink_current_query
 -----------------------------------------------------------------------------------------------------------------------------------------------------
  select dblink_current_query() from (select dblink('dbname=postgres','select oid, proname from pg_proc where proname = ''byteacat''') as f1) as t1;
 (1 row)