and it has been ineffective for a long time. Reported by Peter E.
…->allowedModes includes SFRM_Materialize. Therefore add this check and throw an error when we don't have an expectedDesc.
The new function checks that the R object is coercible and therefore ensures we don't throw an error in R code which involves a longjmp and subsequent crash in postgres. In passing generate body of R function in slightly cleaner fashion, and include the return value from R_PARSEVECTOR inside the PROTECT() macro in plr_parse_func_body().
…nbreak compilation with older versions of postgres not having rangetypes * cast call to system() as void to stop compiler from complaining
… 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.
…using expansion assignment (:=) in places that did not need it and msvc script was not prepared to deal with it. - Add support for pgsql 9.1 CREATE EXTENSION is a way that also preserves backward compatability for prior pgsql releases. Simple method used will require keeping old plr.sql.in in sync with newer equiv files but that seemed to be the most straightforward - Initial some new-to-this-release variables to keep the compiler quiet. These warnings don't get generated when building with -O0, so I didn't see them until now.
failure on other platforms
R. Specific example from Hans-Jürgen Schönig was trying to return a closure (function pointer) as pg data type TEXT. This was causing an untrappable long jump within the R interpreter when trying to coerce it to character, resulting in a Postgres crash. At this point only allow return of these non-standard data types when the pg return type is BYTEA. That will allow them to be streamed to pg for storage which is about the only useful thing you could do with them anyway.
…ersion of R vector to pg array, cannot simply memcpy from R to Datum array for int4 on 64 bit OS because Datums are 8 bytes. I originally missed the boat on the conversion optimization in this direction anyway since I was using construct_md_array() which still does element-by-element copying. Instead build the pg array manually and memcpy the data bytes directly.
on function return.
and cross linked to the Functions and Arguments chapter.
and new plr_version() function.
- Added two more arguments available to R: - fnumrows = number of rows in the window frame of the current row - prownum = the 1 based row number withing the partition
not support WINDOW functions
regression test changes -- docs to be done later with WINDOW docs.
functions. Make window frame datums available as a new set of arguments (farg1, farg2, ..., fargN) to the R script. Inspiration by Ian Gow. Still lacks regression and documentation and needs more testing. - Minor fixes for compiler warnings by updated gcc
to happen when query cancel is attempted. Take SIGINT back into Postgres control. Report and test case by Terry Schmitt.