Go to file
Bruce Momjian 620dddf88a > The previous patch fixed an infinite recursion bug in
> contrib/tablefunc/tablefunc.c:connectby. But, other unmanageable error
> seems to occur even if a table has commonplace tree data(see below).
>
> I would think the patch, ancestor check, should be
>
>   if (strstr(branch_delim || branchstr->data || branch_delim,
>                        branch_delim || current_key || branch_delim))
>
> This is my image, not a real code. However, if branchstr->data includes
> branch_delim, my image will not be perfect.

Good point. Thank you Masaru for the suggested fix.

Attached is a patch to fix the bug found by Masaru. His example now
produces:

regression=# SELECT * FROM connectby('connectby_tree', 'keyid',
'parent_keyid', '11', 0, '-') AS t(keyid int, parent_keyid int, level
int,
branch text);
  keyid | parent_keyid | level |  branch

-------+--------------+-------+----------
     11 |              |     0 | 11
     10 |           11 |     1 | 11-10
    111 |           11 |     1 | 11-111
      1 |          111 |     2 | 11-111-1
(4 rows)

While making the patch I also realized that the "no show branch" form of
the  function was not going to work very well for recursion detection.
Therefore  there is now a default branch delimiter ('~') that is used
internally, for  that case, to enable recursion detection to work. If
you need a different  delimiter for your specific data, you will have to
use the "show branch" form  of the function.

Joe Conway
2002-10-03 17:11:12 +00:00
config Remove leftovers from subproject removals. Fixes for Python and Kerberos 2002-09-04 22:54:18 +00:00
contrib > The previous patch fixed an infinite recursion bug in 2002-10-03 17:11:12 +00:00
doc Add: 2002-10-03 16:39:02 +00:00
src The attached patch fixes a number of issues related to compiling the 2002-10-03 17:09:42 +00:00
COPYRIGHT Update copyright to 2002. 2002-06-20 20:29:54 +00:00
GNUmakefile.in Adjust the tarball splitting scheme to the new reality. 2002-09-06 21:57:11 +00:00
HISTORY Update HISTORY/release.sgml for 7.2.3. 2002-10-01 03:23:05 +00:00
INSTALL Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc 2002-08-22 22:43:14 +00:00
Makefile Restructure the key include files per recent pghackers discussion: there 2001-02-10 02:31:31 +00:00
README Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc 2002-08-22 22:43:14 +00:00
aclocal.m4 Remove leftovers from subproject removals. Fixes for Python and Kerberos 2002-09-04 22:54:18 +00:00
configure Stamp configure for beta2. 2002-09-25 13:23:15 +00:00
configure.in Stamp configure for beta2. 2002-09-25 13:23:15 +00:00
register.txt Stamp 7.2 for release. 2002-02-03 21:00:09 +00:00

README

PostgreSQL Database Management System
=====================================
  
This directory contains the source code distribution of the PostgreSQL
database management system.

PostgreSQL is an advanced object-relational database management system
that supports an extended subset of the SQL standard, including
transactions, foreign keys, subqueries, triggers, user-defined types
and functions.  This distribution also contains several language
bindings, including C, Perl, Python, and Tcl, as well as drivers
for JDBC.

As of v7.3, the ODBC and C++ interfaces have been moved over to the
PostgreSQL Projects WebSite @ http://gborg.postgresql.org.

See the file INSTALL for instructions on how to build and install
PostgreSQL.  That file also lists supported operating systems and
hardware platforms and contains information regarding any other
software packages that are required to build or run the PostgreSQL
system.  Changes between all PostgreSQL releases are recorded in the
file HISTORY.  Copyright and license information can be found in the
file COPYRIGHT.  A comprehensive documentation set is included in this
distribution; it can be read as described in the installation
instructions.

The latest version of this software may be obtained at
ftp://ftp.postgresql.org/pub/.  For more information look at our web
site located at http://www.postgresql.org/.