{"id":20626704,"url":"https://github.com/dimensionsoftware/plv8js","last_synced_at":"2026-04-17T16:01:35.457Z","repository":{"id":6805370,"uuid":"8053193","full_name":"DimensionSoftware/plv8js","owner":"DimensionSoftware","description":"A fork of plv8 intending to add commonjs require and updated livescript support","archived":false,"fork":false,"pushed_at":"2013-02-06T15:13:09.000Z","size":544,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-15T04:36:59.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DimensionSoftware.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-06T14:53:55.000Z","updated_at":"2014-05-10T03:08:18.000Z","dependencies_parsed_at":"2022-09-12T23:01:53.096Z","dependency_job_id":null,"html_url":"https://github.com/DimensionSoftware/plv8js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DimensionSoftware/plv8js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionSoftware%2Fplv8js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionSoftware%2Fplv8js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionSoftware%2Fplv8js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionSoftware%2Fplv8js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DimensionSoftware","download_url":"https://codeload.github.com/DimensionSoftware/plv8js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimensionSoftware%2Fplv8js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31935697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T12:37:54.787Z","status":"ssl_error","status_checked_at":"2026-04-17T12:37:25.095Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T13:14:28.165Z","updated_at":"2026-04-17T16:01:35.422Z","avatar_url":"https://github.com/DimensionSoftware.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"NOTE: This is a fork of PLV8.  The official maintained package can be found at:\r\n\r\n   http://code.google.com/p/plv8js/wiki/PLV8\r\n\r\n\r\nA Procedural Language in JavaScript powered by V8\r\n=================================================\r\n\r\nplv8 is a shared library that provides a PostgreSQL procedural language powered\r\nby V8 JavaScript Engine.  With this program you can write in JavaScript your\r\nfunction that is callable from SQL.\r\n\r\n\r\nChanges From Official Version\r\n-----------------------------\r\n\r\n- Added CommonJS module system\r\n- Added require()\r\n- Added initialization script\r\n\r\nSystem-wide modules live in /usr/local/plv8/lib.\r\n\r\nUser modules live in /usr/local/plv8/plv8_modules.\r\n\r\n\r\n\r\n\r\nREQUIREMENT\r\n-----------\r\n\r\nplv8 is tested with:\r\n\r\n- PG: version 8.4, 9.0, 9.1, 9.2 and 9.3dev (maybe older are allowed)\r\n- V8: version 3.14.5\r\n- g++: version 4.5.1\r\n\r\nAlso all tools that PostgreSQL and V8 require to be built are required.\r\n\r\nINSTALL\r\n-------\r\n\r\nThere are two ways to build plv8.  The first is default `make`, which depends\r\non system-installed libv8 and plv8 will be dynamically link to it.  The second\r\nis `make static`, which will download v8 soure at a specific version and build\r\nit, and statically link plv8 to it.  PGXN install will use the former, while\r\nyou can do the latter manually if you have not installed v8 yet.\r\n\r\nOnce you installed plv8 into your dabase, create language via\r\n\r\n  $ psql -c 'CREATE EXTENSION plv8'\r\n  $ psql -c 'CREATE EXTENSION plls'\r\n  $ psql -c 'CREATE EXTENSION plcoffee'\r\n\r\nin 9.1 or later, or in the prior versions\r\n\r\n  $ psql -f plv8.sql\r\n\r\nto create database objects.\r\n\r\nIn mingw64, you may have difficulty in building plv8.  If so, try to make\r\nthe following changes in Makefile.\r\n\r\n  CUSTOM_CC = gcc\r\n  SHLIB_LINK := $(SHLIB_LINK) -lv8 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm\r\n\r\nFor more detail, please refer to http://code.google.com/p/plv8js/issues/detail?id=29\r\n\r\nTEST\r\n----\r\n\r\nplv8 supports installcheck test.  Make sure set custom_variable_classes = 'plv8'\r\nin your postgresql.conf (before 9.2) and run\r\n\r\n  $ make installcheck\r\n\r\nEXAMPLE (JAVASCRIPT)\r\n--------------------\r\n\r\n  CREATE OR REPLACE FUNCTION plv8_test(keys text[], vals text[])\r\n  RETURNS text AS $$\r\n    var o = {};\r\n    for(var i=0; i\u003ckeys.length; i++){\r\n      o[keys[i]] = vals[i];\r\n    }\r\n    return JSON.stringify(o);\r\n  $$ LANGUAGE plv8 IMMUTABLE STRICT;\r\n  \r\n  SELECT plv8_test(ARRAY['name', 'age'], ARRAY['Tom', '29']);\r\n           plv8_test        \r\n  ---------------------------\r\n   {\"name\":\"Tom\",\"age\":\"29\"}\r\n  (1 row)\r\n\r\nEXAMPLE (COFFEESCRIPT)\r\n----------------------\r\n\r\n  CREATE OR REPLACE FUNCTION plcoffee_test(keys text[], vals text[])\r\n  RETURNS text AS $$\r\n    return JSON.stringify(keys.reduce(((o, key, idx) -\u003e\r\n      o[key] = vals[idx]; return o), {}), {})\r\n  $$ LANGUAGE plcoffee IMMUTABLE STRICT;\r\n  \r\n  SELECT plcoffee_test(ARRAY['name', 'age'], ARRAY['Tom', '29']);\r\n         plcoffee_test       \r\n  ---------------------------\r\n   {\"name\":\"Tom\",\"age\":\"29\"}\r\n  (1 row)\r\n\r\nEXAMPLE (LIVESCRIPT)\r\n--------------------\r\n\r\n  CREATE OR REPLACE FUNCTION plls_test(keys text[], vals text[])\r\n  RETURNS text AS $$\r\n    return JSON.stringify { [key, vals[idx]] for key, idx in keys }\r\n  $$ LANGUAGE plls IMMUTABLE STRICT;\r\n  \r\n  SELECT plls_test(ARRAY['name', 'age'], ARRAY['Tom', '29']);\r\n           plls_test        \r\n  ---------------------------\r\n   {\"name\":\"Tom\",\"age\":\"29\"}\r\n  (1 row)\r\n\r\nNOTES\r\n-----\r\nplv8 is hosted at Google Project Hosting\r\nhttp://code.google.com/p/plv8js/\r\n\r\nand distributed by PGXN.  For more detail, see\r\nhttp://pgxn.org/dist/plv8/doc/plv8.html\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensionsoftware%2Fplv8js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimensionsoftware%2Fplv8js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimensionsoftware%2Fplv8js/lists"}