1. 12 Sep, 2002 5 commits
    • Bruce Momjian's avatar
      No change. · e04069fb
      Bruce Momjian authored
      e04069fb
    • Bruce Momjian's avatar
      > Now I'm testing connectby() in the /contrib/tablefunc in 7.3b1, which would · f490dbe5
      Bruce Momjian authored
      > be a useful function for many users.   However, I found the fact that
      > if connectby_tree has the following data, connectby() tries to search the end
      > of roots without knowing that the relations are infinite(-5-9-10-11-9-10-11-)
      .
      > I hope connectby() supports a check routine to find infinite relations.
      >
      >
      > CREATE TABLE connectby_tree(keyid int, parent_keyid int);
      > INSERT INTO connectby_tree VALUES(1,NULL);
      > INSERT INTO connectby_tree VALUES(2,1);
      > INSERT INTO connectby_tree VALUES(3,1);
      > INSERT INTO connectby_tree VALUES(4,2);
      > INSERT INTO connectby_tree VALUES(5,2);
      > INSERT INTO connectby_tree VALUES(6,4);
      > INSERT INTO connectby_tree VALUES(7,3);
      > INSERT INTO connectby_tree VALUES(8,6);
      > INSERT INTO connectby_tree VALUES(9,5);
      >
      > INSERT INTO connectby_tree VALUES(10,9);
      > INSERT INTO connectby_tree VALUES(11,10);
      > INSERT INTO connectby_tree VALUES(9,11);    <-- infinite
      >
      
      The attached patch fixes the infinite recursion bug in
      contrib/tablefunc/tablefunc.c:connectby found by Masaru Sugawara.
      
      test=# SELECT * FROM connectby('connectby_tree', 'keyid',
      'parent_keyid', '2', 4, '~') AS t(keyid int, parent_keyid int, level
      int, branch text);
        keyid | parent_keyid | level |   branch
      -------+--------------+-------+-------------
            2 |              |     0 | 2
            4 |            2 |     1 | 2~4
            6 |            4 |     2 | 2~4~6
            8 |            6 |     3 | 2~4~6~8
            5 |            2 |     1 | 2~5
            9 |            5 |     2 | 2~5~9
           10 |            9 |     3 | 2~5~9~10
           11 |           10 |     4 | 2~5~9~10~11
      (8 rows)
      
      test=# SELECT * FROM connectby('connectby_tree', 'keyid',
      'parent_keyid', '2', 5, '~') AS t(keyid int, parent_keyid int, level
      int, branch text);
      ERROR:  infinite recursion detected
      
      I implemented it by checking the branch string for repeated keys
      (whether or not the branch is returned). The performance hit was pretty
      minimal -- about 1% for a moderately complex test case (220000 record
      table, 9 level tree with 3800 members).
      
      Joe Conway
      f490dbe5
    • Bruce Momjian's avatar
      > BTW, clusterdb is not schema-aware and will surely fail in any database · b2711a0a
      Bruce Momjian authored
      > where more than one schema is in use, because it doesn't trouble to
      > schema-qualify table names.
      
      Ok, the following patch should solve this concern.  It also tries to
      connect as little times as possible (the previous one would connect one
      time per table plus one per database; this one connects two times per
      database).
      
      Alvaro Herrera
      b2711a0a
    • Bruce Momjian's avatar
      The attached small patch fixes the cause of the regression test failure · 5dd74c0f
      Bruce Momjian authored
      for contrib/intarray.
      
      The cause was that the library uses its own function to construct a new
      array, new_intArrayType, and that function did not set the new array
      struct attribute elemtype.
      
      Joe Conway
      5dd74c0f
    • Bruce Momjian's avatar
      The attached removes the current non-standard file · 6fff9a74
      Bruce Momjian authored
      "contrib/tablefunc/tablefunc-test.sql", and adds a standard regression
      test suite to contrib/tablefunc.
      
      Joe Conway
      6fff9a74
  2. 11 Sep, 2002 6 commits
    • Bruce Momjian's avatar
      Add sprompt.obj to Win32 makefiles. · 6309033b
      Bruce Momjian authored
      6309033b
    • Bruce Momjian's avatar
      68ba17d4
    • Tom Lane's avatar
      Tweak querytree-dependency-extraction code so that columns of tables · 6fdc44be
      Tom Lane authored
      that are explicitly JOINed are not considered dependencies unless they
      are actually used in the query: mere presence in the joinaliasvars
      list of a JOIN RTE doesn't count as being used.  The patch touches
      a number of files because I needed to generalize the API of
      query_tree_walker to support an additional flag bit, but the changes
      are otherwise quite small.
      6fdc44be
    • Barry Lind's avatar
      Patches submitted by Kris Jurka (jurka@ejurka.com) for the following bugs: · d634a590
      Barry Lind authored
        - Properly drop tables in jdbc regression tests with cascade for 7.3
        - problem with Statement.execute() and executeUpdate() not clearing binds
        - problem with ResultSet not correctly handling default encoding
        - changes to correctly support show transaction isolation level in 7.3
        - changed DatabaseMetaDataTest to handle differences in FK names in 7.3
        - better fix for dynamically checking server NAME data length
        (With the fixes above the jdbc regression tests pass on jdbc2 and jdbc3
         against both a 7.2 and 7.3 server)
      Patchs submitted by David Wall (d.wall@computer.org):
        - problem with getBlob when largeobject oid is null
        - improvements to BlobOutputStream
      Patch submitted by Haris Peco (snpe@snpe.co.yu):
        - problem with callable statement not supporting prepared statement methods
      
       Modified Files:
       	jdbc/org/postgresql/Driver.java.in
       	jdbc/org/postgresql/jdbc1/AbstractJdbc1Connection.java
       	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
       	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
       	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
       	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
       	jdbc/org/postgresql/jdbc2/Jdbc2ResultSet.java
       	jdbc/org/postgresql/jdbc3/Jdbc3ResultSet.java
       	jdbc/org/postgresql/largeobject/BlobOutputStream.java
       	jdbc/org/postgresql/largeobject/LargeObject.java
       	jdbc/org/postgresql/test/TestUtil.java
       	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
       	jdbc/org/postgresql/test/jdbc2/UpdateableResultTest.java
       	jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java
       	jdbc/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java
       	jdbc/org/postgresql/test/jdbc2/optional/SimpleDataSourceTest.java
      d634a590
    • Bruce Momjian's avatar
    • Bruce Momjian's avatar
      Fix atan() description. · 6a5733a1
      Bruce Momjian authored
      Bruno Wolff III
      6a5733a1
  3. 10 Sep, 2002 2 commits
  4. 09 Sep, 2002 1 commit
  5. 08 Sep, 2002 2 commits
  6. 07 Sep, 2002 5 commits
  7. 06 Sep, 2002 9 commits
  8. 05 Sep, 2002 10 commits