Skip to content

Instantly share code, notes, and snippets.

@babakness
Forked from benjie/README.md
Created Jun 21, 2017
Embed
What would you like to do?
Easy plv8 on OSX

Heroku runs plv8 v1.4.2 (checked on 1st April 2016). On OSX it's easiest to install v1.4.3 since that allows V8 3.15 which is available via homebrew. (1.4.2 wants V8 3.14.5).

To install:

brew install v8-315
pip install pgxnclient
LIBRARY_PATH="/usr/local/opt/v8-315/lib" CPATH="/usr/local/opt/v8-315/include" pgxnclient install plv8=1.4.3

To test it worked:

$ psql
# CREATE EXTENSION plv8;
CREATE EXTENSION
# DO $$ plv8.elog(NOTICE, "Hello World") $$ LANGUAGE plv8;
NOTICE:  Hello World
DO
# DROP EXTENSION plv8;
DROP EXTENSION
# 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment