Skip to content

Commit

Permalink
Merge pull request #208 from JerrySievert/r2.0
Browse files Browse the repository at this point in the history
R2.0
  • Loading branch information
JerrySievert committed Feb 3, 2017
2 parents e1c97ed + 2c94f4f commit c60d6ef
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 38 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for plv8

2.0.0 2017-02-02
- track v8 5.4.500.43

2.0.0-dev
- track v8 4.4-4.10
- add plv8_version()
Expand Down
34 changes: 16 additions & 18 deletions META.json
Expand Up @@ -2,12 +2,9 @@
"name": "plv8",
"abstract": "A procedural language in JavaScript powered by V8",
"description": "plv8 is a trusted procedural language that is safe to use, fast to run and easy to develop.",
"version": "2.0.0-dev1",
"version": "2.0.0",
"maintainer": [
"Hitoshi Harada <umi.tanuki@gmail.com>",
"Andrew Dunstan <AMDunstan@gmail.com>",
"Takahiro Itagaki <itagaki.takahiro@gmail.com>",
"Kiswono Prayogo <kiswono@gmail.com>"
"Jerry Sievert <code@legitimatesounding.com>"
],
"license": {
"PostgreSQL": "http://www.postgresql.org/about/licence"
Expand All @@ -16,42 +13,42 @@
"prereqs": {
"runtime": {
"requires": {
"v8": "3.6.2",
"v8": "5.4.500",
"PostgreSQL": "8.4.0"
},
"recommends": {
"PostgreSQL": "9.2.0"
"PostgreSQL": "9.5.0"
}
}
},
"provides": {
"plv8": {
"file": "plv8--2.0.0-dev1.sql",
"file": "plv8--2.0.0.sql",
"docfile": "doc/plv8.md",
"version": "2.0.0-dev1",
"version": "2.0.0",
"abstract": "A procedural language in JavaScript"
},
"plcoffee": {
"file": "plcoffee--2.0.0-dev1.sql",
"file": "plcoffee--2.0.0.sql",
"docfile": "doc/plv8.md",
"version": "2.0.0-dev1",
"version": "2.0.0",
"abstract": "A procedural language in CoffeeScript"
},
"plls": {
"file": "plls--2.0.0-dev1.sql",
"file": "plls--2.0.0.sql",
"docfile": "doc/plv8.md",
"version": "2.0.0-dev1",
"version": "2.0.0",
"abstract": "A procedural language in LiveScript"
}
},
"resources": {
"homepage": "http://code.google.com/p/plv8js/",
"homepage": "https://github.com/plv8/plv8",
"bugtracker": {
"web": "http://code.google.com/p/plv8js/issues/list"
"web": "https://github.com/plv8/plv8/issues"
},
"repository": {
"url": "https://code.google.com/p/plv8js/",
"web": "http://code.google.com/p/plv8js/source/checkout",
"url": "https://github.com/plv8/plv8",
"web": "https://github.com/plv8/plv8.git",
"type": "git"
}
},
Expand All @@ -61,6 +58,7 @@
},
"tags": [
"PL",
"JavaScript"
"JavaScript",
"v8"
]
}
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -12,7 +12,7 @@
# 'make static' will download v8 and build, then statically link to it.
#
#-----------------------------------------------------------------------------#
PLV8_VERSION = 2.0.0-dev
PLV8_VERSION = 2.0.0

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down
4 changes: 2 additions & 2 deletions Makefile.v8
Expand Up @@ -67,8 +67,8 @@ else
SHLIB_LINK += -L$(AUTOV8_OUT)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CCFLAGS += -stdlib=libstdc++
SHLIB_LINK += -stdlib=libstdc++
CCFLAGS += -stdlib=libc++ -std=c++11
SHLIB_LINK += -stdlib=libc++
endif
ifeq ($(UNAME_S),Linux)
SHLIB_LINK += -lrt
Expand Down
22 changes: 5 additions & 17 deletions doc/plv8.md
Expand Up @@ -21,7 +21,6 @@ The documentation covers the following implemented features:
- [Window function API](#window-function-api)
- [Typed array](#typed-array)
- [ES6 Language Features](#es6-language-features)
- [Remote debugger](#remote-debugger)
- [Runtime environment separation across users in the same session](#runtime-environment-separation-across-users-in-the-same-session)
- [Start-up procedure](#start-up-procedure)
- [Update procedure](#update-procedure)
Expand All @@ -31,7 +30,7 @@ The documentation covers the following implemented features:
PL/v8 is tested with:

- PG: version 9.2, 9.3, 9.4 and 9.5 (maybe older/newer are allowed)
- V8: version 4.4 to 5.1
- V8: version 4.4 to 5.4
- g++: version 4.8.2
- clang++

Expand All @@ -43,9 +42,9 @@ are building those from source.
### Build from source:
Determine the [PL/v8 release](https://github.com/plv8/plv8/releases) you want to download and use it's version and path below.
```shell
$ wget https://github.com/plv8/plv8/archive/v1.5.5.tar.gz
$ tar -xvzf v1.5.5.tar.gz
$ cd plv8-1.5.5
$ wget https://github.com/plv8/plv8/archive/v2.0.0.tar.gz
$ tar -xvzf v2.0.0.tar.gz
$ cd plv8-2.0.0
$ make static
```
This will build PL/v8 for you linking to Google's v8 as a static library by
Expand Down Expand Up @@ -378,8 +377,7 @@ returned value is an integer that represents number of affected rows.
var num_affected = plv8.execute( 'DELETE FROM tbl WHERE price > $1', [ 1000 ] );
```

Note this function and similar are not allowed outside of transaction,
which can be the case when using the remote debugger.
Note this function and similar are not allowed outside of transaction.

### `plv8.prepare( sql, [, typenames] )`
Opens a prepared statement. The `typename` parameter is an array where
Expand Down Expand Up @@ -603,16 +601,6 @@ per function base, the V8 flags cannot be changed once the runtime is
initialized. So normally this setting should rather be set per database,
and not per session.

## Remote debugger
PL/v8 supports v8 remote debugger. You need to enable it at the compile time
to pass `ENABLE_DEBUGGER_SUPPORT` to `make`. `make static` will automatically
turns it on. If enabled, and once PL/v8 module is loaded (and the execution
engine is initialized, PL/v8 accepts a remote debugger connection. If you
have `d8` from v8 package, run with `--remote-debug --debug-port=35432` to
attach the functions. If you want to change the remote debugger port, there
is a GUC `plv8.debugger_port` to set the port number. You can also try
`debugger` statement inside functions to set a breakpoint. For more details
of v8 remote debugger, see v8 documentation.

## Runtime environment separation across users in the same session
In PL/v8, each session has one global JS runtime context. This enables function
Expand Down

0 comments on commit c60d6ef

Please sign in to comment.