head 1.8; access; symbols pkgsrc-2013Q2:1.8.0.54 pkgsrc-2013Q2-base:1.8 pkgsrc-2012Q4:1.8.0.52 pkgsrc-2012Q4-base:1.8 pkgsrc-2011Q4:1.8.0.50 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q2:1.8.0.48 pkgsrc-2011Q2-base:1.8 pkgsrc-2009Q4:1.8.0.46 pkgsrc-2009Q4-base:1.8 pkgsrc-2008Q4:1.8.0.44 pkgsrc-2008Q4-base:1.8 pkgsrc-2008Q3:1.8.0.42 pkgsrc-2008Q3-base:1.8 cube-native-xorg:1.8.0.40 cube-native-xorg-base:1.8 pkgsrc-2008Q2:1.8.0.38 pkgsrc-2008Q2-base:1.8 pkgsrc-2008Q1:1.8.0.36 pkgsrc-2008Q1-base:1.8 pkgsrc-2007Q4:1.8.0.34 pkgsrc-2007Q4-base:1.8 pkgsrc-2007Q3:1.8.0.32 pkgsrc-2007Q3-base:1.8 pkgsrc-2007Q2:1.8.0.30 pkgsrc-2007Q2-base:1.8 pkgsrc-2007Q1:1.8.0.28 pkgsrc-2007Q1-base:1.8 pkgsrc-2006Q4:1.8.0.26 pkgsrc-2006Q4-base:1.8 pkgsrc-2006Q3:1.8.0.24 pkgsrc-2006Q3-base:1.8 pkgsrc-2006Q2:1.8.0.22 pkgsrc-2006Q2-base:1.8 pkgsrc-2006Q1:1.8.0.20 pkgsrc-2006Q1-base:1.8 pkgsrc-2005Q4:1.8.0.18 pkgsrc-2005Q4-base:1.8 pkgsrc-2005Q3:1.8.0.16 pkgsrc-2005Q3-base:1.8 pkgsrc-2005Q2:1.8.0.14 pkgsrc-2005Q2-base:1.8 pkgsrc-2005Q1:1.8.0.12 pkgsrc-2005Q1-base:1.8 pkgsrc-2004Q4:1.8.0.10 pkgsrc-2004Q4-base:1.8 pkgsrc-2004Q3:1.8.0.8 pkgsrc-2004Q3-base:1.8 pkgsrc-2004Q2:1.8.0.6 pkgsrc-2004Q2-base:1.8 pkgsrc-2004Q1:1.8.0.4 pkgsrc-2004Q1-base:1.8 pkgsrc-2003Q4:1.8.0.2 pkgsrc-2003Q4-base:1.8 netbsd-1-6:1.7.0.8 netbsd-1-6-RELEASE-base:1.7 pkgviews:1.7.0.4 pkgviews-base:1.7 buildlink2:1.7.0.2 buildlink2-base:1.7 netbsd-1-5-PATCH003:1.7 netbsd-1-4-PATCH002:1.3 comdex-fall-1999:1.2; locks; strict; comment @# @; 1.8 date 2003.01.05.20.12.20; author jlam; state dead; branches; next 1.7; 1.7 date 2002.04.04.07.48.31; author jlam; state Exp; branches; next 1.6; 1.6 date 2001.11.04.21.25.48; author darcy; state Exp; branches; next 1.5; 1.5 date 2000.05.20.19.32.48; author jlam; state dead; branches; next 1.4; 1.4 date 2000.03.18.17.43.17; author jlam; state Exp; branches; next 1.3; 1.3 date 2000.02.04.18.04.35; author jlam; state Exp; branches; next 1.2; 1.2 date 99.09.20.23.38.50; author jlam; state Exp; branches; next 1.1; 1.1 date 99.09.19.04.24.55; author jlam; state Exp; branches; next ; desc @@ 1.8 log @Updated databases/postgresql to 7.3.1. ================================================================== | NOTE: A dump-and-restore is required to update your databases | | if you wish to update postgresql-server. If your | | application examines the system catalogs, additional | | changes will be required due to the introduction of | | schemas in 7.3; for more information, see: | | | | http://www.ca.postgresql.org/docs/momjian/upgrade_tips_7.3 | ================================================================== Major changes from version 7.2.3 include: Schemas Schemas allow users to create objects in separate namespaces, so two people or applications can have tables with the same name. There is also a public schema for shared tables. Table/index creation can be restricted by removing permissions on the public schema. Drop Column PostgreSQL now supports the ALTER TABLE ... DROP COLUMN functionality. Table Functions Functions returning multiple rows and/or multiple columns are now much easier to use than before. You can call such a "table function" in the SELECT FROM clause, treating its output like a table. Also, PL/pgSQL functions can now return sets. Prepared Queries PostgreSQL now supports prepared queries, for improved performance. Dependency Tracking PostgreSQL now records object dependencies, which allows improvements in many areas. "DROP" statements now take either CASCADE or RESTRICT to control whether dependent objects are also dropped. Privileges Functions and procedural languages now have privileges, and functions can be defined to run with the privileges of their creator. Internationalization Both multibyte and locale support are now always enabled. Logging A variety of logging options have been enhanced. Interfaces A large number of interfaces have been moved to http://gborg.postgresql.org where they can be developed and released independently. Functions/Identifiers By default, functions can now take up to 32 parameters, and identifiers can be up to 63 bytes long. Also, OPAQUE is now deprecated: there are specific "pseudo-datatypes" to represent each of the former meanings of OPAQUE in function argument and result types. @ text @$NetBSD: patch-am,v 1.7 2002/04/04 07:48:31 jlam Exp $ --- src/interfaces/python/pgmodule.c.orig Mon Dec 3 04:39:44 2001 +++ src/interfaces/python/pgmodule.c @@@@ -343,7 +343,7 @@@@ PQclear(self->last_result); Py_XDECREF(self->pgcnx); - PyMem_DEL(self); + PyObject_DEL(self); } /* closes object */ @@@@ -990,7 +990,7 @@@@ lo_close(self->pgcnx->cnx, self->lo_fd); Py_XDECREF(self->pgcnx); - PyMem_DEL(self); + PyObject_DEL(self); } /* opens large object */ @@@@ -1546,7 +1546,7 @@@@ if (self->cnx) PQfinish(self->cnx); - PyMem_DEL(self); + PyObject_DEL(self); } /* close without deleting */ @@@@ -1579,7 +1579,7 @@@@ if (self->last_result) PQclear(self->last_result); - PyMem_DEL(self); + PyObject_DEL(self); } /* resets connection */ @ 1.7 log @Update postgresql and related packages to 7.2. Thanks to Michael Graff for most of the work on this update. Pkgsrc changes from the previous version include removing Makefile.ssl and some patches that have been integrated into this release of PostgreSQL. We leave open the question of when to byte-compile the Python modules for the PyGreSQL interface and just do it as before, although we should consider doing the compilation as a post-install step to ensure that the timestamps are correct. We also reorder some lines in the Makefile to include Makefile.common below certain definitions (GNU_CONFIGURE, USE_BUILDLINK_ONLY) as they may possibly trigger different portions of Makefile.common. *** Please note that a dump/restore is required to migrate an existing *** *** PostgreSQL installation to 7.2. *** Major changes from version 7.1.3 are geared toward improving use in high-volume applications and include: VACUUM Vacuuming no longer locks tables, thus allowing normal user access during the vacuum. A new "VACUUM FULL" command does old-style vacuum by locking the table and shrinking the on-disk copy of the table. Transactions There is no longer a problem with installations that exceed four billion transactions. OID's OID's are now optional. Users can now create tables without OID's for cases where OID usage is excessive. Optimizer The system now computes histogram column statistics during "ANALYZE", allowing much better optimizer choices. Security A new MD5 encryption option allows more secure storage and transfer of passwords. A new Unix-domain socket authentication option is available on Linux and BSD systems. PAM authentication is also available. Statistics Administrators can use the new table access statistics module to get fine-grained information about table and index usage. @ text @d1 1 a1 1 $NetBSD$ @ 1.6 log @The PyGreSQL module here has some nasty bugs which will be fixed in the next distribution. This patch brings it up to date now. Major fixes: - Support for more types. This fixes a bug introduced in the current PostgreSQL because of the different way of handling agregates. - Add WIN32 support - Fix some DB-API quoting problems @ text @d3 1 a3 1 --- src/interfaces/python/pgmodule.c.orig Thu Aug 16 14:36:44 2001 d5 2 a6 2 @@@@ -27,25 +27,16 @@@@ */ d8 4 a11 41 #include -#include -#include -#include +#include "postgres.h" +#include "libpq-fe.h" +#include "libpq/libpq-fs.h" +#include "catalog/pg_type.h" #include #include #include -/* really bad stuff here - I'm so naughty */ -/* If you need to you can run mkdefines to get */ -/* current defines but it should not have changed */ -#define INT2OID 21 -#define INT4OID 23 -#define OIDOID 26 -#define FLOAT4OID 700 -#define FLOAT8OID 701 -#define CASHOID 790 - static PyObject *PGError; -static const char *PyPgVersion = "3.1"; +static const char *PyPgVersion = "3.2"; /* taken from fileobject.c */ #define BUF(v) PyString_AS_STRING((PyStringObject *)(v)) @@@@ -103,14 +94,16 @@@@ static PyObject *pg_default_host; /* default database host */ static PyObject *pg_default_base; /* default database name */ -static PyObject *pg_default_opt;/* default connection options */ -static PyObject *pg_default_tty;/* default debug tty */ +static PyObject *pg_default_opt; /* default connection options */ +static PyObject *pg_default_tty; /* default debug tty */ static PyObject *pg_default_port; /* default connection port */ static PyObject *pg_default_user; /* default username */ static PyObject *pg_default_passwd; /* default password */ - #endif /* DEFAULT_VARS */ d13 7 a19 9 +DL_EXPORT(void) init_pg(void); +int *get_type_array(PGresult *result, int nfields); + /* --------------------------------------------------------------------- */ /* OBJECTS DECLARATION */ @@@@ -242,7 +235,6 @@@@ return 1; a20 63 - #endif /* LARGE_OBJECTS */ /* checks source object validity */ @@@@ -292,12 +284,14 @@@@ { case INT2OID: case INT4OID: + case INT8OID: case OIDOID: typ[j] = 1; break; case FLOAT4OID: case FLOAT8OID: + case NUMERICOID: typ[j] = 2; break; @@@@ -484,7 +478,6 @@@@ pgsource_oidstatus(pgsourceobject * self, PyObject * args) { long oid; - const char *status; /* checks validity */ if (!check_source_obj(self, CHECK_RESULT)) @@@@ -566,6 +559,7 @@@@ } PyList_Append(reslist, rowtuple); + Py_DECREF(rowtuple); self->current_row++; } @@@@ -947,11 +941,7 @@@@ /* query type definition */ staticforward PyTypeObject PgSourceType = { -#ifndef MS_WIN32 - PyObject_HEAD_INIT(&PyType_Type) -#else PyObject_HEAD_INIT(NULL) -#endif 0, /* ob_size */ "pgsourceobject", /* tp_name */ @@@@ -1460,7 +1450,6 @@@@ 0, /* tp_as_mapping */ 0, /* tp_hash */ }; - #endif /* LARGE_OBJECTS */ @@@@ -1803,12 +1792,14 @@@@ { case INT2OID: case INT4OID: + case INT8OID: case OIDOID: typ[j] = 1; break; d22 4 a25 5 case FLOAT4OID: case FLOAT8OID: + case NUMERICOID: typ[j] = 2; break; d27 2 a28 98 @@@@ -1853,21 +1844,33 @@@@ val = PyFloat_FromDouble(strtod(s, NULL)); break; - case 3: /* get rid of the '$' and commas */ - if (*s == '$') /* there's talk of getting rid of - * it */ + case 3: + { + int mult = 1; + + if (*s == '$') /* there's talk of getting + * rid of it */ s++; - if ((s[0] == '-' || s[0] == '(') && s[1] == '$') - *(++s) = '-'; + if (*s == '-' || *s == '(') + { + s++; + mult = -1; + } + + /* get rid of the '$' and commas */ + if (*s == '$') /* Just in case we exposed + * one */ + s++; for (k = 0; *s; s++) if (*s != ',') cashbuf[k++] = *s; cashbuf[k] = 0; - val = PyFloat_FromDouble(strtod(cashbuf, NULL)); + val = PyFloat_FromDouble(strtod(cashbuf, NULL) * mult); break; + } default: val = PyString_FromString(s); @@@@ -1938,12 +1941,14 @@@@ { case INT2OID: case INT4OID: + case INT8OID: case OIDOID: typ[j] = 1; break; case FLOAT4OID: case FLOAT8OID: + case NUMERICOID: typ[j] = 2; break; @@@@ -1988,21 +1993,33 @@@@ val = PyFloat_FromDouble(strtod(s, NULL)); break; - case 3: /* get rid of the '$' and commas */ - if (*s == '$') /* there's talk of getting rid of - * it */ + case 3: + { + int mult = 1; + + if (*s == '$') /* there's talk of getting + * rid of it */ s++; - if ((s[0] == '-' || s[0] == '(') && s[1] == '$') - *(++s) = '-'; + if (*s == '-' || *s == '(') + { + s++; + mult = -1; + } + + /* get rid of the '$' and commas */ + if (*s == '$') /* Just in case we exposed + * one */ + s++; for (k = 0; *s; s++) if (*s != ',') cashbuf[k++] = *s; cashbuf[k] = 0; - val = PyFloat_FromDouble(strtod(cashbuf, NULL)); + val = PyFloat_FromDouble(strtod(cashbuf, NULL) * mult); break; + } default: val = PyString_FromString(s); @@@@ -2318,7 +2335,6 @@@@ Py_INCREF(Py_None); return Py_None; a29 2 - #endif /* DIRECT_ACCESS */ d31 4 d36 2 a37 11 @@@@ -2622,7 +2638,6 @@@@ static PyObject * pg_getattr(pgobject * self, char *name) { - /* * Although we could check individually, there are only a few * attributes that don't require a live connection and unless someone @@@@ -3104,7 +3119,6 @@@@ return old; a38 11 - #endif /* DEFAULT_VARS */ /* List of functions defined in the module */ @@@@ -3141,7 +3155,8 @@@@ *v; /* Initialize here because some WIN platforms get confused otherwise */ - PglargeType.ob_type = PgType.ob_type = PgQueryType.ob_type = &PyType_Type; + PglargeType.ob_type = PgType.ob_type = PgQueryType.ob_type = + PgSourceType.ob_type = &PyType_Type; d40 1 a40 2 /* Create the module and add the functions */ mod = Py_InitModule4("_pg", pg_methods, pg__doc__, NULL, PYTHON_API_VERSION); @ 1.5 log @Update postgresql to 7.0. Also closes PR#8616. Changes from 6.5.3: A HUGE number of bug/performance fixes and minor enhancements. Foreign Keys Foreign keys are now implemented, with the exception of PARTIAL MATCH foreign keys. Many users have been asking for this feature, and we are pleased to offer it. Optimizer Overhaul Continuing on work started a year ago, the optimizer has been overhauled, allowing improved query execution and better performance with less memory usage. Updated psql psql, our interactive terminal monitor, has been updated with a variety of new features. See the psql manual page for details. Upcoming Features In 7.1 or 7.2, we plan to have outer joins, storage for very long rows, and a write-ahead logging system. A dump/restore using pg_dump is required for those wishing to migrate data from any previous release. For those upgrading from 6.5.*, you can use pg_upgrade to upgrade to this release. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.4 2000/03/18 17:43:17 jlam Exp $ d3 256 a258 37 --- interfaces/jdbc/Makefile.orig Wed Jun 23 01:56:17 1999 +++ interfaces/jdbc/Makefile Thu Mar 16 17:49:44 2000 @@@@ -27,7 +27,7 @@@@ # In 6.5, the all rule builds the makeVersion class which then calls make using # the jdbc1 or jdbc2 rules all: makeVersion.class - make $$($(JAVA) makeVersion) + $(MAKE) $$($(JAVA) makeVersion) @@echo ------------------------------------------------------------ @@echo The JDBC driver has now been built. To make it available to @@echo other applications, copy the postgresql.jar file to a public @@@@ -45,10 +45,10 @@@@ @@echo @@echo ------------------------------------------------------------ @@echo To build the examples, type: - @@echo " make examples" + @@echo " $(MAKE) examples" @@echo @@echo "To build the CORBA example (requires Java2):" - @@echo " make corba" + @@echo " $(MAKE) corba" @@echo ------------------------------------------------------------ @@echo @@@@ -121,10 +121,10 @@@@ @@echo JDBC 1 specification, and one to the JDBC 2 specification. @@echo @@echo To build the driver for JDBC 1 (usually for JDK 1.1 thru 1.1.7) - @@echo then type: make jdbc1 + @@echo then type: $(MAKE) jdbc1 @@echo @@echo To build the driver for JDBC 2 (usually for JDK 1.2 and later) - @@echo then type: make jdbc2 + @@echo then type: $(MAKE) jdbc2 @@echo @@echo If you still have problems, then please email the interfaces @@echo or bugs lists, or better still to me direct (peter@@retep.org.uk) @ 1.4 log @Change structure of postgresql package. Shared library build is now unlibtoolized. Things now install into ${PREFIX} instead of ${PREFIX}/${PGSQL_USER} to match hier(7) expectations. The Tcl and Tk interfaces are now split out into separate packages. This closes the following PRs: 7384, 8747, 8789, 9272, 9461. @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Correct SHLIB_LINK redefinition and update patch checksums (patch-ak was out of synch) @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.2 1999/09/20 23:38:50 jlam Exp $ d3 2 a4 2 --- ./pl/plpgsql/src/Makefile.in.orig Wed Jun 30 19:57:31 1999 +++ ./pl/plpgsql/src/Makefile.in Mon Sep 20 01:27:23 1999 d6 34 a39 49 OBJS= pl_parse.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o -SHLIB_LINK+= -L$(LIBPQDIR) -lpq +SHLIB_LINK+= $(LIBPQ) # If crypt is a separate library, rather than part of libc, it may need # to be referenced separately to keep (broken) linkers happy. (This is @@@@ -44,12 +44,18 @@@@ # installed, however, so we ignore the install-shlib rule and do this # instead: +ifneq ($(LIBTOOL),) +install: install-lib + rm -f $(LIBDIR)/lib$(NAME).a + $(LN_S) -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) $(LIBDIR)/plpgsql$(DLSUFFIX) +else install: $(shlib) ifneq ($(shlib),) $(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/plpgsql$(DLSUFFIX) else @@echo "plpgsql not installed due to lack of shared library support." endif +endif pl_handler.o: pl_handler.c plpgsql.h pl.tab.h @@@@ -60,8 +66,10 @@@@ pl_funcs.o: pl_funcs.c plpgsql.h pl.tab.h -pl_parse.o: pl_gram.c pl_scan.c plpgsql.h - $(CC) $(CFLAGS) -c -o $@@ pl_gram.c +pl_parse.o: pl_parse.c plpgsql.h pl.tab.h + +pl_parse.c: pl_gram.c pl_scan.c plpgsql.h + $(LN_S) -f pl_gram.c pl_parse.c pl_gram.c pl.tab.h: gram.y $(YACC) $(YFLAGS) $< @@@@ -79,7 +87,7 @@@@ clean: clean-shlib rm -f lib$(NAME).a - rm -f *.o pl.tab.h pl_gram.c pl_scan.c + rm -f *.o pl.tab.h pl_parse.c pl_gram.c pl_scan.c # And the garbage that might have been left behind by partial build: rm -f y.tab.c y.tab.h lex.yy.c ifeq ($(PORTNAME), win) @ 1.2 log @Update PostgreSQL to 6.5.2. The pgaccess binary is no longer available from the main PostgreSQL distribution, and must be installed separately (databases/pgaccess). Relevant changes from 6.5.1: subselect+CASE fixes(Tom) Add SHLIB_LINK setting for solaris_i386 and solaris_sparc ports(Daren Sefcik) Fixes for CASE in WHERE join clauses(Tom) Fix BTScan abort(Tom) Repair the check for redundant UNIQUE and PRIMARY KEY indices(Thomas) Improve it so that it checks for multi-column constraints(Tom) Fix for Win32 making problem with MB enabled(Hiroki Kataoka) Allow BSD yacc and bison to compile pl code(Bruce) Fix SET NAMES int8 fixes(Thomas) Fix vacuum's memory consumption(Hiroshi,Tatsuo) Reduce the total memory consumption of vacuum(Tom) Fix for timestamp(datetime) Rule deparsing bugfixes(Tom) Fix quoting problems in mkMakefile.tcldefs.sh.in and mkMakefile.tkdefs.sh.in(Tom) This is to re-use space on index pages freed by vacuum(Vadim) document -x for pg_dump(Bruce) Fix for unary operators in rule deparser(Tom) Comment out FileUnlink of excess segments during mdtruncate()(Tom) Irix linking fix from Yu Cao Repair logic error in LIKE: should not return LIKE_ABORT when reach end of pattern before end of text(Tom) Repair incorrect cleanup of heap memory allocation during transaction abort(Tom) @ text @d1 1 a1 1 $NetBSD$ d10 1 a10 1 +SHLIB_LINK+= -L$(LIBPQ) @ 1.1 log @Update postgresql to 6.5.1. Completely libtoolized and ldconfig statements removed, but this should still function correctly on a.out systems. This package was originally submitted by D'Arcy J.M. Cain, but with major overhauling by me. Closes PR#7865 and relevant part of PR#8299. Major changes from version 6.4.2: Multi-version concurrency control(MVCC) This removes our old table-level locking, and replaces it with a locking system that is superior to most commercial database systems. In a traditional system, each row that is modified is locked until committed, preventing reads by other users. MVCC uses the natural multi-version nature of PostgreSQL to allow readers to continue reading consistent data during writer activity. Writers continue to use the compact pg_log transaction system. This is all performed without having to allocate a lock for every row like traditional database systems. So, basically, we no longer are restricted by simple table-level locking; we have something better than row-level locking. Hot backups from pg_dump pg_dump takes advantage of the new MVCC features to give a consistant database dump/backup while the database stays online and available for queries. Numeric data type We now have a true numeric data type, with user-specified precision. Temporary tables Temporary tables are guaranteed to have unique names within a database session, and are destroyed on session exit. New SQL features We now have CASE, INTERSECT, and EXCEPT statement support. We have new LIMIT/OFFSET, SET TRANSACTION ISOLATION LEVEL, SELECT ... FOR UPDATE, and an improved LOCK TABLE command. Speedups We continue to speed up PostgreSQL, thanks to the variety of talents within our team. We have sped up memory allocation, optimization, table joins, and row transfer routines. Ports We continue to expand our port list, this time including WinNT/ix86 and NetBSD/arm32. Interfaces Most interfaces have new versions, and existing functionality has been improved. Documentation New and updated material is present throughout the documentation. New FAQs have been contributed for SGI and AIX platforms. The Tutorial has introductory information on SQL from Stefan Simkovics. For the User's Guide, there are reference pages covering the postmaster and more utility programs, and a new appendix contains details on date/time behavior. The Administrator's Guide has a new chapter on troubleshooting from Tom Lane. And the Programmer's Guide has a description of query processing, also from Stefan, and details on obtaining the Postgres source tree via anonymous CVS and CVSup. @ text @d4 1 a4 1 +++ ./pl/plpgsql/src/Makefile.in Sat Sep 18 03:10:58 1999 d14 1 a14 1 @@@@ -44,12 +44,20 @@@@ d19 1 a19 3 +install: install-lib post-install-lib + +post-install-lib: d21 1 a21 1 + $(LN_S) -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) $(LIBDIR)/plpgsql$(DLSUFFIX) d33 1 a33 1 @@@@ -60,8 +68,10 @@@@ d46 1 a46 1 @@@@ -79,7 +89,7 @@@@ @