INVOKER and DEFINER rights of PGSQL function

Post date: Apr 11, 2013 11:1:49 PM

[EXTERNAL] SECURITY INVOKER

[EXTERNAL] SECURITY DEFINER

SECURITY INVOKER (the default) indicates that the function is to be executed with the privileges of the user that calls it. 

SECURITY DEFINER specifies that the function is to be executed with the privileges of the user that created it. 

The key word EXTERNAL is allowed for SQL conformance, but it is optional since, unlike in SQL, this feature applies to all functions not just external ones.