| PostgreSQL 7.4.16 Documentation | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Fast Forward | Next | |
pg_result returns information about a command result created by a prior pg_exec.
You can keep a command result around for as long as you need it, but when you are done with it, be sure to free it by executing pg_result -clear. Otherwise, you have a memory leak, and pgtcl will eventually start complaining that you have created too many command result objects.
The handle of the command result.
One of the following options, specifying which piece of result information to return:
The status of the result.
The error message, if the status indicates an error, otherwise an empty string.
The connection that produced the result.
If the command was an INSERT, the OID of the inserted row, otherwise 0.
The number of rows (tuples) returned by the query.
The number of rows (tuples) affected by the command.
The number of columns (attributes) in each row.
Assign the results to an array, using subscripts of the form (rowNumber, columnName).
Assign the results to an array using the values of the first column and the names of the remaining column as keys. If appendstr is given then it is appended to each key. In short, all but the first column of each row are stored into the array, using subscripts of the form (firstColumnValue, columnNameAppendStr).
Returns the columns of the indicated row in a list. Row numbers start at zero.
Stores the columns of the row in array arrayName, indexed by column names. Row numbers start at zero.
Returns a list of the names of the columns in the result.
Returns a list of sublists, {name typeOid typeSize} for each column.
Clear the command result object.
No comments could be found for this page.
Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.
In order to submit a comment, you must have a community account.
* denotes required field