pg_sendquery

pg_sendquery — Send query asynchronously

Synopsis

pg_sendquery conn commandString

Description

pg_sendquery sends a command to the database and returns immediately, without waiting for the command to complete and without providing a result handle.

Arguments

conn

The handle of the connection on which to execute the command.

commandString

The SQL command to execute.

Return Value

None.

A Tcl error will be thrown if an error occurs.

Notes

Use pg_isbusy to see if the command is still being executed, and use pg_getresult to get the result when the command has completed.

Caution

This command is part of a new Tcl interface to asynchronous query processing capabilities, and should be considered experimental. The command may change and backwards compatibility is not assured.