Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add more content on README.

  • Loading branch information...
commit 75ca3736e472d4fb13fa15d8acaffd77b458a589 1 parent e02caaf
@umitanuki umitanuki authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 README
View
23 README
@@ -37,6 +37,14 @@ in 9.1 or later, or in the prior versions
to create database objects.
+In mingw64, you may have difficulty in building plv8. If so, try to make
+the following changes in Makefile.
+
+ CUSTOM_CC = gcc
+ SHLIB_LINK := $(SHLIB_LINK) -lv8 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm
+
+For more detail, please refer to http://code.google.com/p/plv8js/issues/detail?id=29
+
TEST
----
@@ -63,6 +71,21 @@ EXAMPLE (JAVASCRIPT)
{"name":"Tom","age":"29"}
(1 row)
+EXAMPLE (COFFEESCRIPT)
+----------------------
+
+ CREATE OR REPLACE FUNCTION plcoffee_test(keys text[], vals text[])
+ RETURNS text AS $$
+ return JSON.stringify(keys.reduce(((o, key, idx) ->
+ o[key] = vals[idx]; return o), {}), {})
+ $$ LANGUAGE plcoffee IMMUTABLE STRICT;
+
+ SELECT plcoffee_test(ARRAY['name', 'age'], ARRAY['Tom', '29']);
+ plcoffee_test
+ ---------------------------
+ {"name":"Tom","age":"29"}
+ (1 row)
+
EXAMPLE (LIVESCRIPT)
--------------------
Please sign in to comment.
Something went wrong with that request. Please try again.