| The PostgreSQL 9.0 Reference Manual - Volume 2 - Programming Guide
by The PostgreSQL Global Development Group Paperback (6"x9"), 478 pages ISBN 9781906966065 RRP £14.95 ($19.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
9.12.2.3 Optimizing PL/pgSQL Functions
PostgreSQL gives you two function creation
modifiers to optimize execution: “volatility” (whether
the function always returns the same result when given the same
arguments) and “strictness” (whether the function
returns null if any argument is null). Consult the CREATE FUNCTION
reference page for details.
When making use of these optimization attributes, your
CREATE FUNCTION statement might look something
like this:
CREATE FUNCTION foo(...) RETURNS integer AS $$ ... $$ LANGUAGE plpgsql STRICT IMMUTABLE;
| ISBN 9781906966065 | The PostgreSQL 9.0 Reference Manual - Volume 2 - Programming Guide | See the print edition |