- 12 Sep, 2002 4 commits
-
-
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
-
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
-
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
-
Bruce Momjian authored
"contrib/tablefunc/tablefunc-test.sql", and adds a standard regression test suite to contrib/tablefunc. Joe Conway
-
- 11 Sep, 2002 6 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
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.
-
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
-
Bruce Momjian authored
-
Bruce Momjian authored
Bruno Wolff III
-
- 10 Sep, 2002 2 commits
- 09 Sep, 2002 1 commit
-
-
Peter Eisentraut authored
-
- 08 Sep, 2002 2 commits
-
-
Bruce Momjian authored
-
Barry Lind authored
Fixed Statement to correctly DEALLOCATE any prepared statements Modified Files: jdbc/org/postgresql/PGStatement.java jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
-
- 07 Sep, 2002 5 commits
-
-
Bruce Momjian authored
NAMEDATALEN of 64. Kris Jurka
-
Bruce Momjian authored
< * Add documentation to lock shared memory into RAM for each OS, if possible
-
Bruce Momjian authored
-
Peter Eisentraut authored
option down to pg_dump, where it's useless, and clarify the meaning of -c in the documentation.
-
Peter Eisentraut authored
-
- 06 Sep, 2002 9 commits
-
-
Peter Eisentraut authored
does not create members larger than allowed by the tar format. Also, fix the generation of the tar header to conform to POSIX.
-
Peter Eisentraut authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Tom Lane authored
never been the correct procedure for locking a relation, and the recently-found ALTER TABLE bug with adding a constraint and a toast table in the same command shows why it's a bad idea.
-
- 05 Sep, 2002 11 commits
-
-
Tom Lane authored
and IS [NOT] OF were not being parsed consistently with other IS forms. Also, make the world a little safer for functions named LEFT, RIGHT, etc.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
Cleanup up memory allocation for $HOME in related psql places. Update mention of $HOME/.pgpass in the docs; add mention in pg_dumpall.
-
Bruce Momjian authored
> * -Add ~/.pgpass to store passwords with user/host/password combinations
-
Peter Eisentraut authored
-
Tom Lane authored
-
Tom Lane authored
it's GetUserNameFromId() now.
-
Tom Lane authored
-
Tom Lane authored
leading to compile warnings).
-