Can't install extension under macOS
gmile opened this issue · 4 comments
I'm trying to test the extension under macOS but failing miserably.
Essentially, I can't even build the extension:
$ env USE_PGXS=1 make
make: Nothing to be done for `all'.
$
Was extension not meant to be installed under macOS?
I'm pretty sure versions of installed software have nothing to do the problem, but to give a little more insight into my env, here they are:
- macOS 10.12.2,
- postgresql 9.6.2 (installed via homebrew),
- flex 2.6.3 (installed via homebrew),
- bison 3.0.4 (installed via homebrew).
Is it possible that extension is already built? If so, it's a normal result.
To rebuild extesnion, use make clean && make. What's happen on make install?
@akorotkov indeed, I just discovered that the extension was already installed (back when I first tried it a couple of weeks ago, but didn't finish with my experiments).
I just ran this to fix the problem with installation:
$ env USE_PGXS=1 make clean
$ env USE_PGXS=1 make
$ env USE_PGXS=1 make install
So that is fixed, thank you @akorotkov for pointing me in the right direction!
Now that I continue, I'm trying to execute an example from Oleg's slide №24 from jsonb-stachka-2017-full.pdf:
$ createdb test_json_ext
$ psql test_json_ext -c "CREATE EXTENSION jsquery;"
$ psql test_json_ext -c "SELECT JSON_EXISTS(jsonb '{"a": 1, "b": 2}', '$.* ? (@ > $x && @ < $y)' PASSING 0 AS x, 2 AS y);"
ERROR: syntax error at or near "PASSING"
LINE 1: ...nb '{"a": 1, "b": 2}', '$.* ? (@ > $x && @ < $y)' PASSING 0 ...
^
What am I missing here?
@obartunov I was so intrigued by the example that I didn't scroll down enough, missing the fact jsquery and sqljson are two different things :)
I'll try the fork using web interface, thank you!