Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Sql
Sql.pgsql

Method Sql.pgsql()->error()


Method error

string error(void|int clear)

Returns

The textual description of the last server-related error. Returns 0 if no error has occurred yet. It is not cleared upon reading (can be invoked multiple times, will return the same result until a new error occurs).

During the execution of a statement, this function accumulates all non-error messages (notices, warnings, etc.). If a statement does not generate any errors, this function will return all collected messages from the last statement.

Note

The string returned is not newline-terminated.

Parameter clear

To clear the error, set it to 1.

See also

big_query()