Permalink
Browse files

- removed support (and overhead) for PostgreSQL prior to 8.2

- added support for NULL array elements (in and out)
- plugged security hole courtesy of Jeff Greco <jeff.greco@bluehavenmg.com>
  • Loading branch information...
jconway
jconway committed Sep 11, 2006
1 parent b15f660 commit f86bec471117f6014ff351906196aff04eafa9f7
Showing with 1,078 additions and 2,373 deletions.
  1. +9 −15 Makefile
  2. +2 −10 README.plr
  3. +10 −10 doc/plr.sgml
  4. +821 −0 expected/plr.out
  5. +11 −1,681 pg_backend_support.c
  6. +95 −59 pg_conversion.c
  7. +1 −1 pg_rsupport.c
  8. +20 −4 pg_userfuncs.c
  9. +102 −26 plr.c
  10. +5 −566 plr.h
  11. +1 −0 plr.sql.in
  12. +1 −1 sql/plr.sql
View
@@ -8,10 +8,6 @@ ifeq ($(PORTNAME), darwin)
DYSUFFIX = dylib
endif
-subdir = contrib/plr
-top_builddir = ../..
-include $(top_builddir)/src/Makefile.global
-
# we can only build PL/R if libR is available
# Since there is no official way to determine this,
# we see if there is a file that is named like a shared library.
@@ -38,22 +34,20 @@ SHLIB_LINK += -L$(r_libdir1x) -L$(r_libdir2x) -lR
DATA_built := plr.sql
DOCS := README.plr
REGRESS := plr
-EXTRA_CLEAN := doc/HTML.index expected/plr.out
+EXTRA_CLEAN := doc/HTML.index
+ifdef USE_PGXS
+PGXS := $(shell pg_config --pgxs)
+include $(PGXS)
+else
+subdir = contrib/plr
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
+endif
override CPPFLAGS := -I$(srcdir) -I$(r_includespec) $(CPPFLAGS)
override CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\" -DDLSUFFIX=\"$(DLSUFFIX)\"
-rpath :=
-
-installcheck: plrinstallcheck
-
-plrinstallcheck:
-ifeq ($(findstring 7.3,$(VERSION)),7.3)
- cp -f $(top_builddir)/$(subdir)/expected/plr.out.7.3 $(top_builddir)/$(subdir)/expected/plr.out
-else
- cp -f $(top_builddir)/$(subdir)/expected/plr.out.7.4 $(top_builddir)/$(subdir)/expected/plr.out
-endif
else # can't build
View
@@ -2,7 +2,7 @@
* PL/R - PostgreSQL support for R as a
* procedural language (PL)
*
- * Copyright (c) 2003, 2004 by Joseph E. Conway
+ * Copyright (c) 2003-2006 by Joseph E. Conway
* ALL RIGHTS RESERVED
*
* Joe Conway <mail@joeconway.com>
@@ -29,16 +29,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-Version 0.1 (10 February, 2003):
- - Initial release
-Version 0.2 (15 February, 2003):
- - Incorporates fixes for lots of bugs and ommissions, in the code and
- docs. Too many to mention, but faithfully recorded in cvs commit
- messages.
-
-Version 0.5 (5 August, 2003) and afterward:
- - See http://www.joeconway.com/plr/ for release notes
+See http://www.joeconway.com/plr/ for release notes
Notes:
- R headers are required. Download and install R prior to building
View
@@ -3,7 +3,7 @@
<title>PL/R User's Guide - R Procedural Language</title>
<bookinfo>
<copyright>
- <year>2003</year>
+ <year>2003-2006</year>
<holder>Joseph E Conway</holder>
</copyright>
</bookinfo>
@@ -67,14 +67,6 @@
</programlisting>
</para>
- <note>
- <para>
- PL/R should build cleanly with PostgreSQL 7.3.x, 7.4.x, and 8.0.x. and
- R 1.6.2 and newer. The current release passed its regression test with
- R 2.0.1 under Fedora Core 2.
- </para>
- </note>
-
<para>
You can use <literal>plr.sql</literal> (which is created in
<literal>contrib/plr</literal>) to create the language and support
@@ -114,16 +106,24 @@ CREATE LANGUAGE plr HANDLER plr_call_handler;
when it was configured, in order for the libR shared object library to be
available.
</para>
+ </tip>
+
+ <tip>
<para>
Additionally, libR must be findable by your runtime linker.
On Linux, this involves adding an entry in /etc/ld.so.conf for the
location of libR (typically $R_HOME/bin), and then running ldconfig.
Refer to <literal>man ldconfig</literal> or its equivalent for your system.
</para>
+ </tip>
+
+ <tip>
<para>
R_HOME must be defined in the environment of the user under which
PostgreSQL is started, <emphasis>before</emphasis> the postmaster
- is started. Otherwise PL/R will refuse to load.
+ is started. Otherwise PL/R will refuse to load. See plr_environ(),
+ which allows examination of the environment available to the
+ PostgreSQL postmaster process.
</para>
</tip>
Oops, something went wrong.

0 comments on commit f86bec4

Please sign in to comment.