v20091101a
by Hitoshi Harada
temporary commit
added downlaod script
Several fixes and improvements by Itagaki Takahiro.
There are incompatibilites in built-in functions and global variables.

  * Support PGXS to build the codes.
  * Added regression tests.
  * Support additional type conversions:
    - timestamp [with time zone]
    - date
    - record (input only)
    - oid
  * Logging function is renamed to print(elevel, ...). Acceptable elevels
    are DEBUG[1-5], LOG, INFO, NOTICE, and WARNING.  Use JavaScript
    exceptions (throw) to report errors; ERROR level are not allowed.
  * Query function is renamed to executeSql(sql). For SELECT statements,
    the returned value is an array of hashes. Each hash represents each
    record. Column names are mapped to hash keys.  For non-SELECT commands,
    the returned value is an integer that represents number of affected rows.
  * Trigger functions receives trigger conditions as function arguments:
    NEW, OLD, TG_NAME, TG_WHEN, TG_LEVEL, TG_OP, TG_RELID, TG_TABLE_NAME,
    TG_TABLE_SCHEMA, and TG_ARGV.
  * Support VARIADIC arguments.
  * Support unnamed arguments. They can be referred with 'arguments' or $N.
  * Fix error handling and exception handling. Postgre's errors (siglongjmp)
    are packed into C++ exceptions to invoke destructors properly,
    and extracted at the end of function.
Support inline statements (DO statements in 9.0).
Tested on 8.4, 9.0b4, and 9.1dev.
Replace deprecated documentation to a link to wiki page.
Support conversion from JSON to record.
Support SETOF record function. Use yield() function (it's not
a statement, but function) to return multiple records.
Note that SETOF scalar values funtion is not supported yet.

Usage:
CREATE FUNCTION set_of_records() RETURNS SETOF rec AS
$$
    yield( { "i": 1, "t": "a" } );
    yield( { "i": 2, "t": "b" } );
    yield( { "i": 3, "t": "c" } );
$$
LANGUAGE plv8;
Add executeSql(sql, args). $n in sql is parsed as placeholder.

Values in args must be null, string, numeric, or boolean.
Other types including object, array, and date are not supported yet.
Split built-in function codes into plv8_func.cc.
Fix code cache to make CREATE OR REPLACE FUNCTION to work.
Use v8::Exception class when throwing exceptions.
Support single INOUT or OUT parameter.
EXTENSION support for 9.1 and 9.2.
Remove old archive files.
Added CUSTOM_CC = g++ per comment in the wiki page.
Allow SHLIB_LINK with path to V8 to be provided on command line
Fix broken Date ADT call
Don't hold type I/O caches inter execusions.
Split JavaScript function cache and type I/O function caches.
Type I/O cache lives as same as the original function memory context.
Always initialize SPI to prepare more SPI function support in the future.