Reputation: 12729
I am trying to run this function but getting error
CREATE EXTENSION plv8;
CREATE OR REPLACE FUNCTION test_func(data json) RETURNS json AS $$
return JSON.stringify(data);
$$ LANGUAGE PLV8;
here is my code
http://sqlfiddle.com/#!17/67b79/11
is there any way or any other online editor where I will run this code
Upvotes: 0
Views: 704
Reputation: 45910
Probably you have not installed a plv8 extension. Before execution the CREATE EXTENSION
command, you should to install extension on server. This extension is not in standard package postgresql-contrib
and then there is small chance so this extension is installed on server by default.
Upvotes: 1