dblink_send_query - sends an async query to a remote database
dblink_send_query(text connname, text sql) returns int
sends a query to be executed
asynchronously, that is, without immediately waiting for the result.
There must not be an async query already in progress on the
After successfully dispatching an async query, completion status
can be checked with
, and the results
are ultimately collected with
It is also possible to attempt to cancel an active async query
Name of the connection to use.
The SQL statement that you wish to execute in the remote database, for example
select * from pg_class.
Returns 1 if the query was successfully dispatched, 0 otherwise.
SELECT dblink_send_query('dtest1', 'SELECT * FROM foo WHERE f1 < 3');