Hi,
OS: OS X El Capitan
PostgreSQL Version: 10 (PostgresApp)
I want to install pllua extension for Lua support from pllua/pllua github repo.
installation says
-specifiy where pg_config is located
I couldnt find it in Postgres.app installation and make && make install
Alternatively i tried
INSERT INTO pg_catalog.pg_pltemplate
VALUES ('pllua', true, 'pllua_call_handler', 'pllua_validator', '$libdir/pllua', NULL);
INSERT INTO pg_catalog.pg_pltemplate
VALUES ('plluau', false, 'plluau_call_handler', 'plluau_validator', '$libdir/pllua', NULL);
replaced cloned pllua path with $libdir and execute from psql
it gives me error
postgre=# INSERT INTO pg_catalog.pg_pltemplate VALUES ('pllua', true, 'pllua_call_handler', 'pllua_validator', '/Users/hakan/pllua', NULL);
ERROR: invalid input syntax for type boolean: "pllua_call_handler"
LINE 2: VALUES ('pllua', true, 'pllua_call_handler', 'pllua_va...
Could you help me please?
If you don't have set your path for PostgresApp, pg_config should be found in /Applications/Postgres.app/Contents/Versions/latest/bin/pg_config. But at first you apparently need a working lua installation. I did a try with the one Homebrew provides (5.2) but failed to build pllua 1.0 from pgFounrdy against PostgreSQL 10. I tried it with the current master from GitHub which succeeded after adjusting the makefile to match the paths:
LUA_INCDIR ?= /usr/local/include
LUALIB ?= -L/usr/local/lib -llua
with this, make & make install ran successfully against a PostgresApp with PostgreSQL 10 and I was able to CREATE EXTENSION pllua; and run a simple test like DO $$ print(_VERSION) $$ LANGUAGE pllua;
As I'm not into lua nor pl/lua, I have no idea how stable the current master of pllua is and if it is supposed to run with lua 5.2 while the Makefile explicitly requests 5.1. At least there seems nothing in PostgresApp to stop you building and using it.
a late thanks @tbussmann
On the my side with Lua 5.2.2 (brew installed), everything works like a charm now!
I executed my complex lua scripts in it.
Thanks.
Most helpful comment
If you don't have set your path for PostgresApp,
pg_configshould be found in/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config. But at first you apparently need a working lua installation. I did a try with the one Homebrew provides (5.2) but failed to build pllua 1.0 from pgFounrdy against PostgreSQL 10. I tried it with the current master from GitHub which succeeded after adjusting the makefile to match the paths:with this,
make & make installran successfully against a PostgresApp with PostgreSQL 10 and I was able toCREATE EXTENSION pllua;and run a simple test likeDO $$ print(_VERSION) $$ LANGUAGE pllua;As I'm not into lua nor pl/lua, I have no idea how stable the current master of pllua is and if it is supposed to run with lua 5.2 while the Makefile explicitly requests 5.1. At least there seems nothing in PostgresApp to stop you building and using it.