Function Calls

PLV8 has the ability to execute multiple types of function calls inside of PostgreSQL.

Scalar Function Calls

In PLV8, you can write your invoked function call in Javascript, using the usual CREATE FUNCTION statement. Here is an example of a scalar function call:

``` CREATE FUNCTION plv8_test(keys TEXT[], vals TEXT[]) RETURNS JSON AS $$ var o = {}; for(var i=0; i