Change log: 8.3.0.15 to 8.3.0.16

- Remove autocommit setting -- it has been removed in PostgreSQL 9.5, and it has been ineffective for a long time. Reported by Peter E.

- Fix RPM spec file

Change log: 8.3.0.14 to 8.3.0.15

- Update for PostgreSQL 9.3 compatibility

- Ensure certain errors in R code do not crash postgres

- Unbreak compilation with older versions of postgres not having rangetypes

- Allow use of OUT parameters

Change log: 8.3.0.13.1 to 8.3.0.14

- Update copyright for 2013

- Remove hack to take signal back from R interpreter (Mark Kirkwood)

- Set R_SignalHandlers = 0, the proper way to prevent R from taking signals in the first place (Mark Kirkwood)

- Adjust RPM spec file

- As of pg9.2 the syntax "LANGUAGE 'C'" no longer works. Use "LANGUAGE C" instead.

- The MacPorts installation has the header filed distributed across two different directories, so there is no single "rincludedir" to query from pkg-config. Instead, do it the proper way and ask pkg-config for the cflags, which should work for all installation variants. (Peter Eisentraut)

Change log: 8.3.0.13 to 8.3.0.13.1

- Fix CREATE FUNCTION statements so that they work with PostgreSQL 9.2.x

Change log: 8.3.0.10 to 8.3.0.11

- Special case array marshaling, in and out, for int4 and float8 arrays if certain conditions are met. This results in dramatic performance improvement when, for example, passing very large float8 arrays on a 64 bit machine from pg to R.

Change log: 8.3.0.8 to 8.3.0.9

- Consolidate and reorder all header files in order to avoid namespace conflicts between postgres/R/Win32

- Rather than referencing pkglib_path and Dynamic_library_path, reference my_exec_path instead. This is because the former are not exported in win32 and the latter is. Instead get Dynamic_library_path by calling GetConfigOptionByName() and pkglib_path by calling get_pkglib_path().

- Recognize hex input since bytea output is formatted that way by default starting with PostgreSQL 9.0

Change log: 8.3.0.7 to 8.3.0.8

Change log: 8.2.0.9 to 8.2.0.10

- Added ability to convert bytea arguments from Postgres back into the original R object

- Added function to unserialize bytea value in order to restore object outside of R (useful for image data)

- Work on this release was carried out in collaboration with the Chief Information Officer Branch, Treasury Board Secretariat, of the Canadian Government

Change log: 8.3.0.6 to 8.3.0.7

Change log: 8.2.0.8 to 8.2.0.9

Change log: 0.6.2.9 to 0.6.2.10

- Fixed "Rdevices.h" not found error related to R-2.8.x

- Fixed crashbug reported by Jeff Hamann. When a data frame had a factor column with a value in the first row, but NA in a subsequent row, a non-trapped R error would cause a segfault (PL/R's bug, not R)

- Corrected Makefile for use on Gentoo per Ian Stakenvicius

- Add facility to create pdf version of docs

Change log: 8.3.0.5-beta to 8.3.0.6

Change log: 8.2.0.7 to 8.2.0.8

Change log: 0.6.2.8 to 0.6.2.9

- Fix Makefile for include directory names with embedded spaces

- Eliminate warnings that started with R-2.6.0 related to lack of const declarations

- Add --no-restore to startup options

- Fix old bug related to Rversion.h appearing after user of R_VERSION in precompiler tests. Led to Rembedded.h not getting included

- Added explicit define for KillAllDevices as it has been removed from Rdevices.h as of R-2.7.0

Change log: 8.3.0.4-beta to 8.3.0.5-beta

Change log: 8.2.0.6 to 8.2.0.7

Change log: 0.6.2.7 to 0.6.2.8

- fix for non-portable use of setenv

Change log: 8.3.0.3-beta to 8.3.0.4-beta

Change log: 8.2.0.5 to 8.2.0.6

Change log: 0.6.2.6 to 0.6.2.7

- If R_HOME environment variable is not defined, attempt to find it using pkg-config. (idea from Dirk Eddelbuettel)

- In any case, create define for default R_HOME based on pkg-config. Use the default R_HOME during R interpreter init if the environment variable is unset. (idea from Dirk Eddelbuettel)

- Use PGdlLIMPORT instead of dlLIMPORT if it is defined.

- Switch to Rf_isVectorList instead of IS_LIST for spi_execp argument test. Prior to R-2.4.0, the latter allows bad arguments to get past, causing a segfault in an R internal type coersion function. (found by Steve Singer)

- Force R interpreter non-interactive mode. Fixes some cases that previously appeared to be hung postgres backends in certain errors occured in R (R was actually waiting for user input). On some platforms this situation caused segfaults instead. (found by Jie Zhang)

- When a plr function source is empty, plr tries to find a function by the same name within the R interpreter environment. If the function could not be found, it would cause a hang or segfault. This was not easily trapped in the R interpreter. Now, build and compile the equivalent plr source. This allows the R interpreter to trap the error properly when the function does not exist. (found by Jie Zhang)

Change log: 0.5.1-alpha to 0.5.2-alpha

Change log: 0.5.0-alpha to 0.5.1-alpha

Bug fixes:

- Fix crash bug -- if ERROR occurred during SQL call, e.g. while using pg.spi.exec, R never got the chance to clean up properly. In some cases this would lead to a crash. Now sections that might possibly generate elog/ereports beneath plr's control while executing code called from the R interpreter are wrapped in "if (sigsetjmp(Warn_restart...". This grabs back control before it is returned to the postmaster, and allows us to call R's "error()" function. Now we can allow the R interpreter to gracefully clean up and exit with an error flagged. On the other side of the R eval call, we grab the error flag, and generate another error.

- Match change to PL/pgSQL by Tom Lane. When compiling a plr trigger function, include the OID of the table the trigger is attached to in the hashkey. This ensures that we will create separate compiled trees for each table the trigger is used with, avoiding possible datatype-mismatch problems if the tables have different rowtypes.

- Minor documentation improvments

Change log: 0.4.5-alpha to 0.5.0-alpha

Author's Note: This release is probably the last alpha release.
With the addition of trigger support, I think PL/R is (nearly?) feature complete.
Note that there are some significant changes to semantics with respect to NULLs and NAs
in this release.

I'm very interested in feedback -- please find my email address in README.plr to report
bugs, obvious omissions, etc. I'd also be interested in hearing how PL/R is being used.

- Adjust to change in call interface of get_fn_expr_rettype and get_fn_expr_argtype in PostgreSQL 7.4devel.

- Changes needed to fix compilation under Postgres 7.3.

- Now have two regression expected files -- one for 7.3 and one for 7.4.

- Remove dims and dimnames attribute from data.frames created by pg_tuple_get_r_frame(). This fixes a problem that lm() was having with plr created data.frames, and appears to be correct based on the docs and data.frames created by R itself (examined using dput()).

- Remove the preloaded TYPEOIDS and provide instead a new function, load_r_typenames(), that provides the same global variables in the R interpreter. But instead of making *every* connection pay the price, now it can be used on demand only when needed.

- Reworked initialization functions -- now use plr_init when using the postgresql.conf preload_libraries parameter

- Fixed problem with plr_SPI_context global not handling reentrancy correctly, leading to crash when throw_pg_notice was called from a nested plr function.

Change log: 0.4.4-alpha to 0.4.5-alpha

Bug fixes:

- Adjust to a change in the call interface of get_fn_expr_rettype() and get_fn_expr_argtype in PostgreSQL 7.4devel.

Change log: 0.4.2-alpha to 0.4.4-alpha

Bug fixes:

- Changed declaration of environ to something (hopefully) more portable

Documentation:

- Fixed synchronization of actual function names with those in the text/examples.

Change log: 0.4.0-alpha to 0.4.2-alpha

Enhancements:

- Remove the --gui=none argument from the embedded interpreter
initialization. This allows use of a graphics device such as jpeg, so that charts
can be rendered and spooled to disk for, e.g., pickup by a PHP script.

Change log: 0.3.0-alpha to 0.3.1-alpha

Change log: 0.1.0-alpha to 0.3.0-alpha

- Added case to allow returning setof scalar datatype -- until now, had to use record or define one column tuple type.

- Added support for 3D PostgreSQL arrays as input arguments to PL/R functions.

- Added support for returning 3D arrays. Specifically, if the R return value is a 3D array, and the PL/R function is declared to return an array type, the returned array will also be 3D.

- Change start_interp from static to extern so that it can be called by the Postmaster during startup. This allows PL/R and R itself to be loaded and initialized before backends are forked, saving the startup time for each backend.

Bug fixes:

- Check for R_HOME defined in the environment and refuse to start if it isn't. If we don't, R will, and when it unexpectedly exits, we segfault.

- Fix bug that allowed function returning record or tupletype, but not setof, to return all the rows instead of just one.

- Fix bug that allowed function returning tuptype in targetlist to crash instead of just complaining about bad context.