Utility Functions

PostgreSQL 9.0.4 Documentation
Prev | Fast Backward | Chapter 42. PL/Python - Python Procedural Language | Fast Forward | Next

# 42.8. Utility Functions

The `plpy` module also provides the functions `plpy.debug(`msg`)`, `plpy.log(`msg`)`, `plpy.info(`msg`)`, `plpy.notice(`msg`)`, `plpy.warning(`msg`)`, `plpy.error(`msg`)`, and `plpy.fatal(`msg`)`. `plpy.error` and `plpy.fatal` actually raise a Python exception which, if uncaught, propagates out to the calling query, causing the current transaction or subtransaction to be aborted. `raise plpy.Error(`msg`)` and `raise plpy.Fatal(`msg`)` are equivalent to calling `plpy.error` and `plpy.fatal`, respectively. The other functions only generate messages of different priority levels. Whether messages of a particular priority are reported to the client, written to the server log, or both is controlled by the log_min_messages and client_min_messages configuration variables. See Chapter 18 for more information.

Prev | Home | Next
Database Access | Up | Environment Variables