Skip to content

Instantly share code, notes, and snippets.

@adam-zacharski
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-zacharski/f0073366e818caaf1ec7 to your computer and use it in GitHub Desktop.
Save adam-zacharski/f0073366e818caaf1ec7 to your computer and use it in GitHub Desktop.
Simple PLV8
DO $$
var json_result = plv8.execute( 'SELECT * FROM snapshot' );
var results = [];
json_result.forEach(function(r){
if(r.blob && r.blob.archive.indexOf('824149b96bb9')){
plv8.elog(NOTICE, JSON.stringify(r));
}
});
plv8.elog(NOTICE, 'length', json_result.length)
$$ LANGUAGE plv8;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment