summaryrefslogtreecommitdiff
path: root/databases/postgresql94-plpython
diff options
context:
space:
mode:
Diffstat (limited to 'databases/postgresql94-plpython')
-rw-r--r--databases/postgresql94-plpython/DESCR9
-rw-r--r--databases/postgresql94-plpython/MESSAGE17
-rw-r--r--databases/postgresql94-plpython/Makefile18
-rw-r--r--databases/postgresql94-plpython/PLIST22
4 files changed, 66 insertions, 0 deletions
diff --git a/databases/postgresql94-plpython/DESCR b/databases/postgresql94-plpython/DESCR
new file mode 100644
index 00000000000..142bb15309d
--- /dev/null
+++ b/databases/postgresql94-plpython/DESCR
@@ -0,0 +1,9 @@
+PL/Python allows you to write functions in the Python programming
+language that may be used in SQL queries as if they were built into
+Postgres. The PL/Python intepreter is a full Python interpreter.
+
+PL/Python is currently only available as an "untrusted" language
+(meaning it does not offer any way of restricting what users can do
+in it). It has therefore been named "plpythonu". The trusted variant
+plpython may become available again in future, if a new secure execution
+mechanism is developed in Python.
diff --git a/databases/postgresql94-plpython/MESSAGE b/databases/postgresql94-plpython/MESSAGE
new file mode 100644
index 00000000000..5d291f0bc49
--- /dev/null
+++ b/databases/postgresql94-plpython/MESSAGE
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2015/01/14 21:01:19 adam Exp $
+
+Please see the PL/Python section of the PostgreSQL Programmer's Guide
+(databases/postgresql-docs) for information on programming with
+${PKGNAME}.
+
+Note that PL/Python is unrestricted language, meaning it does not
+offer any way of restricting what users can do in it. Any DB user with
+access to PL/Python can run arbitrary Python code under privileges
+of the PostgreSQL server process.
+
+To enable PL/Python for database <dbname>, run following:
+
+createlang plpythonu <dbname>
+
+===========================================================================
diff --git a/databases/postgresql94-plpython/Makefile b/databases/postgresql94-plpython/Makefile
new file mode 100644
index 00000000000..11984e1c320
--- /dev/null
+++ b/databases/postgresql94-plpython/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD: Makefile,v 1.1 2015/01/14 21:01:19 adam Exp $
+
+PKGNAME= ${DISTNAME:C/-/94-plpython-/}
+COMMENT= PL/Python procedural language for the PostgreSQL backend
+
+DEPENDS+= postgresql94-server>=${PKGVERSION_NOREV}:../../databases/postgresql94-server
+
+.include "../../databases/postgresql94/Makefile.common"
+
+CONFIGURE_ARGS+= --with-python
+CONFIGURE_ENV+= PYTHON="${PYTHONBIN}"
+BUILD_MAKE_FLAGS= PGXS=1
+
+BUILD_DIRS= src/pl/plpython
+
+.include "../../databases/postgresql94-client/buildlink3.mk"
+.include "../../lang/python/extension.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/postgresql94-plpython/PLIST b/databases/postgresql94-plpython/PLIST
new file mode 100644
index 00000000000..f0cf52589f0
--- /dev/null
+++ b/databases/postgresql94-plpython/PLIST
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2015/01/14 21:01:19 adam Exp $
+${PLIST.py2x}lib/postgresql/plpython2.so
+${PLIST.py3x}lib/postgresql/plpython3.so
+share/locale/cs/LC_MESSAGES/plpython-9.4.mo
+share/locale/de/LC_MESSAGES/plpython-9.4.mo
+share/locale/es/LC_MESSAGES/plpython-9.4.mo
+share/locale/fr/LC_MESSAGES/plpython-9.4.mo
+share/locale/it/LC_MESSAGES/plpython-9.4.mo
+share/locale/ja/LC_MESSAGES/plpython-9.4.mo
+share/locale/pl/LC_MESSAGES/plpython-9.4.mo
+share/locale/pt_BR/LC_MESSAGES/plpython-9.4.mo
+share/locale/ru/LC_MESSAGES/plpython-9.4.mo
+share/locale/zh_CN/LC_MESSAGES/plpython-9.4.mo
+${PLIST.py2x}share/postgresql/extension/plpython2u--1.0.sql
+${PLIST.py2x}share/postgresql/extension/plpython2u--unpackaged--1.0.sql
+${PLIST.py2x}share/postgresql/extension/plpython2u.control
+${PLIST.py3x}share/postgresql/extension/plpython3u--1.0.sql
+${PLIST.py3x}share/postgresql/extension/plpython3u--unpackaged--1.0.sql
+${PLIST.py3x}share/postgresql/extension/plpython3u.control
+${PLIST.py2x}share/postgresql/extension/plpythonu--1.0.sql
+${PLIST.py2x}share/postgresql/extension/plpythonu--unpackaged--1.0.sql
+${PLIST.py2x}share/postgresql/extension/plpythonu.control