Function planner related parameters

Function planner related parameters give the planner information about a function's execution cost. This helps the planner to generate a good execution plan. The following three parameters are used by the planner to determine the cost of executing the function, the number of rows that are expected to be returned, and whether the function pushes down when evaluating predicates:

  • LEAKPROOF: LEAKPROOF means that the function has no side effects. It does not reveal any information about its argument. For example, it does not throw error messages about its argument. This parameter affects views with the security_barrier parameter.
  • COST: This declares the execution cost per row; the default value for the C language ...

Get Learning PostgreSQL 11 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.