summaryrefslogtreecommitdiff
path: root/databases/postgresql81-plpython
diff options
context:
space:
mode:
authoruebayasi <uebayasi>2006-03-20 14:45:49 +0000
committeruebayasi <uebayasi>2006-03-20 14:45:49 +0000
commit7e0795777da540ef2d3767e04a4b7899e9bb4446 (patch)
tree01f97ba1ec4e22f842ff2ee3d5772cd73553d32a /databases/postgresql81-plpython
parent6ba7aa1298b94a0feaa3bb665901c300762d3ffa (diff)
downloadpkgsrc-7e0795777da540ef2d3767e04a4b7899e9bb4446.tar.gz
Initial import of PostgreSQL 8.1.3, from pkgsrc-wip.
This is an overview of new features in 8.1.0 against 8.0.x. 8.1.3 includes many bug fixes since 8.1.0. Please read documentation of the detailed changes and procedure of data migration. Overview Major changes in this release: Improve concurrent access to the shared buffer cache (Tom) Access to the shared buffer cache was identified as a significant scalability problem, particularly on multi-CPU systems. In this release, the way that locking is done in the buffer manager has been overhauled to reduce lock contention and improve scalability. The buffer manager has also been changed to use a "clock sweep" replacement policy. Allow index scans to use an intermediate in-memory bitmap (Tom) In previous releases, only a single index could be used to do lookups on a table. With this feature, if a query has "WHERE tab.col1 = 4 and tab.col2 = 9", and there is no multicolumn index on col1 and col2, but there is an index on col1 and another on col2, it is possible to search both indexes and combine the results in memory, then do heap fetches for only the rows matching both the col1 and col2 restrictions. This is very useful in environments that have a lot of unstructured queries where it is impossible to create indexes that match all possible access conditions. Bitmap scans are useful even with a single index, as they reduce the amount of random access needed; a bitmap index scan is efficient for retrieving fairly large fractions of the complete table, whereas plain index scans are not. Add two-phase commit (Heikki Linnakangas, Alvaro, Tom) Two-phase commit allows transactions to be "prepared" on several computers, and once all computers have successfully prepared their transactions (none failed), all transactions can be committed. Even if a machine crashes after a prepare, the prepared transaction can be committed after the machine is restarted. New syntax includes "PREPARE TRANSACTION" and "COMMIT/ROLLBACK PREPARED". A new system view pg_prepared_xacts has also been added. Create a new role system that replaces users and groups (Stephen Frost) Roles are a combination of users and groups. Like users, they can have login capability, and like groups, a role can have other roles as members. Roles basically remove the distinction between users and groups. For example, a role can: + Have login capability (optionally) + Own objects + Hold access permissions for database objects + Inherit permissions from other roles it is a member of Once a user logs into a role, she obtains capabilities of the login role plus any inherited roles, and can use "SET ROLE" to switch to other roles she is a member of. This feature is a generalization of the SQL standard's concept of roles. This change also replaces pg_shadow and pg_group by new role-capable catalogs pg_authid and pg_auth_members. The old tables are redefined as read-only views on the new role tables. Automatically use indexes for MIN() and MAX() (Tom) In previous releases, the only way to use an index for MIN() or MAX() was to rewrite the query as "SELECT col FROM tab ORDER BY col LIMIT 1". Index usage now happens automatically. Move /contrib/pg_autovacuum into the main server (Alvaro) Integrating autovacuum into the server allows it to be automatically started and stopped in sync with the database server, and allows autovacuum to be configured from "postgresql.conf". Add shared row level locks using SELECT ... FOR SHARE (Alvaro) While PostgreSQL's MVCC locking allows "SELECT" to never be blocked by writers and therefore does not need shared row locks for typical operations, shared locks are useful for applications that require shared row locking. In particular this reduces the locking requirements imposed by referential integrity checks. Add dependencies on shared objects, specifically roles (Alvaro) This extension of the dependency mechanism prevents roles from being dropped while there are still database objects they own. Formerly it was possible to accidentally "orphan" objects by deleting their owner. While this could be recovered from, it was messy and unpleasant. Improve performance for partitioned tables (Simon) The new constraint_exclusion configuration parameter avoids lookups on child tables where constraints indicate that no matching rows exist in the child table. This allows for a basic type of table partitioning. If child tables store separate key ranges and this is enforced using appropriate "CHECK" constraints, the optimizer will skip child table accesses when the constraint guarantees no matching rows exist in the child table.
Diffstat (limited to 'databases/postgresql81-plpython')
-rw-r--r--databases/postgresql81-plpython/DESCR9
-rw-r--r--databases/postgresql81-plpython/MESSAGE17
-rw-r--r--databases/postgresql81-plpython/Makefile21
-rw-r--r--databases/postgresql81-plpython/PLIST2
4 files changed, 49 insertions, 0 deletions
diff --git a/databases/postgresql81-plpython/DESCR b/databases/postgresql81-plpython/DESCR
new file mode 100644
index 00000000000..142bb15309d
--- /dev/null
+++ b/databases/postgresql81-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/postgresql81-plpython/MESSAGE b/databases/postgresql81-plpython/MESSAGE
new file mode 100644
index 00000000000..de7e7b09ad3
--- /dev/null
+++ b/databases/postgresql81-plpython/MESSAGE
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2006/03/20 14:45:51 uebayasi 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/postgresql81-plpython/Makefile b/databases/postgresql81-plpython/Makefile
new file mode 100644
index 00000000000..cd74f9d118f
--- /dev/null
+++ b/databases/postgresql81-plpython/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2006/03/20 14:45:51 uebayasi Exp $
+
+PKGNAME= postgresql81-plpython-${BASE_VERS}
+COMMENT= PL/Python procedural language for the PostgreSQL backend
+
+DEPENDS+= postgresql81-server>=${BASE_VERS}:../../wip/postgresql81-server
+
+.include "../../wip/postgresql81/Makefile.common"
+
+CONFIGURE_ARGS+= --with-python
+CONFIGURE_ENV+= PYTHON="${PYTHONBIN}"
+
+BUILD_DIRS= ${WRKSRC}/src/pl/plpython
+
+USE_LIBTOOL= yes
+PKG_LIBTOOL= ${PKG_SHLIBTOOL}
+
+.include "../../wip/postgresql81-client/buildlink3.mk"
+.include "../../lang/python/extension.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/postgresql81-plpython/PLIST b/databases/postgresql81-plpython/PLIST
new file mode 100644
index 00000000000..9b28139f80f
--- /dev/null
+++ b/databases/postgresql81-plpython/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2006/03/20 14:45:51 uebayasi Exp $
+${PG_SUBPREFIX}lib/postgresql/plpython.la