Collapse AllExpand All

6.3. Edit postgresql.conf

Make sure the postgresql.conf file in your database server's data directory contains the following lines if you're running PostgreSQL 9.1 on Mac or Linux (NOTE: PostgreSQL 9.1 is not currently supported on Windows):

custom_variable_classes = 'plv8'
plv8.start_proc = 'xt.js_init'

If you are running PostgreSQL 9.2.0 and later, only include the following line:

plv8.start_proc = 'xt.js_init'

You can put those lines anywhere in the postgresql.conf file you want but it's safest to put them at the end. If there's already a custom_variable_classes line with something between the single-quotes, add ,plv8 to the line inside the quotes. You can check if plv8.start_proc is there already by querying the database server in psql or pgAdmin:

psql> show plv8.start_proc;