PostgreSQL Tcl Interface Documentation | ||||
---|---|---|---|---|
Prev | Fast Backward | Fast Forward | Next |
pg_exec
submits a command to the PostgreSQL server and returns a result. Command result handles start with the connection handle and add a period and a result number.
Note that lack of a Tcl error is not proof that the command succeeded! An error message returned by the server will be processed as a command result with failure status, not by generating a Tcl error in pg_exec
.
If the [-paramarray] flag is provided, then a substitution is performed on the query, securely replacing each back-quote delimited name with the corresponding entry from the named array. If the array does not contain the named element, then NULL is substituted (similarly to the way an array created by -withoutnulls is generated). Each such name must occur in a location where a value or field name could appear. See pg_select for more info.
conn
The handle of the connection on which to execute the command.
commandString
The SQL command to execute.
args
For PostgreSQL versions greater than 7.4, args
consists of zero or more optional values that can be inserted, unquoted, into the SQL statement using $-style substitution. Nulls are represented by the string "NULL".