# PLJS/Postgres Integration PLJS has the ability to execute function calls inside of Postgres. ## Scalar Function Calls In PLJS, 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 pljs_test(keys TEXT[], vals TEXT[]) RETURNS JSONB AS $$ var o = {}; for(var i=0; i