diff -U3 /tmp/cirrus-ci-build/contrib/tablefunc/expected/tablefunc.out /tmp/cirrus-ci-build/build/testrun/tablefunc/regress/results/tablefunc.out --- /tmp/cirrus-ci-build/contrib/tablefunc/expected/tablefunc.out 2024-03-26 23:35:26.212045000 +0000 +++ /tmp/cirrus-ci-build/build/testrun/tablefunc/regress/results/tablefunc.out 2024-03-26 23:53:46.995192000 +0000 @@ -4,6 +4,7 @@ -- no easy way to do this for regression testing -- SELECT avg(normal_rand)::int, count(*) FROM normal_rand(100, 250, 0.2); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree avg | count -----+------- 250 | 100 @@ -11,6 +12,7 @@ -- negative number of tuples SELECT avg(normal_rand)::int, count(*) FROM normal_rand(-1, 250, 0.2); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: number of rows cannot be negative -- -- crosstab() @@ -18,6 +20,7 @@ CREATE TABLE ct(id int, rowclass text, rowid text, attribute text, val text); \copy ct from 'data/ct.data' SELECT * FROM crosstab2('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 ----------+------------+------------ test1 | val2 | val3 @@ -26,6 +29,7 @@ (3 rows) SELECT * FROM crosstab3('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 ----------+------------+------------+------------ test1 | val2 | val3 | @@ -34,6 +38,7 @@ (3 rows) SELECT * FROM crosstab4('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 | category_4 ----------+------------+------------+------------+------------ test1 | val2 | val3 | | @@ -42,6 +47,7 @@ (3 rows) SELECT * FROM crosstab2('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 ----------+------------+------------ test1 | val1 | val2 @@ -50,6 +56,7 @@ (3 rows) SELECT * FROM crosstab3('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 ----------+------------+------------+------------ test1 | val1 | val2 | val3 @@ -58,6 +65,7 @@ (3 rows) SELECT * FROM crosstab4('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 | category_4 ----------+------------+------------+------------+------------ test1 | val1 | val2 | val3 | val4 @@ -66,6 +74,7 @@ (3 rows) SELECT * FROM crosstab2('SELECT rowid, attribute, val FROM ct where rowclass = ''group2'' and (attribute = ''att1'' or attribute = ''att2'') ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 ----------+------------+------------ test3 | val1 | val2 @@ -73,6 +82,7 @@ (2 rows) SELECT * FROM crosstab3('SELECT rowid, attribute, val FROM ct where rowclass = ''group2'' and (attribute = ''att1'' or attribute = ''att2'') ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 ----------+------------+------------+------------ test3 | val1 | val2 | @@ -80,6 +90,7 @@ (2 rows) SELECT * FROM crosstab4('SELECT rowid, attribute, val FROM ct where rowclass = ''group2'' and (attribute = ''att1'' or attribute = ''att2'') ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 | category_4 ----------+------------+------------+------------+------------ test3 | val1 | val2 | | @@ -87,6 +98,7 @@ (2 rows) SELECT * FROM crosstab2('SELECT rowid, attribute, val FROM ct where rowclass = ''group2'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 ----------+------------+------------ test3 | val1 | val2 @@ -94,6 +106,7 @@ (2 rows) SELECT * FROM crosstab3('SELECT rowid, attribute, val FROM ct where rowclass = ''group2'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 ----------+------------+------------+------------ test3 | val1 | val2 | val3 @@ -101,6 +114,7 @@ (2 rows) SELECT * FROM crosstab4('SELECT rowid, attribute, val FROM ct where rowclass = ''group2'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree row_name | category_1 | category_2 | category_3 | category_4 ----------+------------+------------+------------+------------ test3 | val1 | val2 | val3 | @@ -108,6 +122,7 @@ (2 rows) SELECT * FROM crosstab('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;') AS c(rowid text, att1 text, att2 text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | att1 | att2 -------+------+------- test1 | val1 | val2 @@ -116,6 +131,7 @@ (3 rows) SELECT * FROM crosstab('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;') AS c(rowid text, att1 text, att2 text, att3 text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | att1 | att2 | att3 -------+------+-------+------- test1 | val1 | val2 | val3 @@ -124,6 +140,7 @@ (3 rows) SELECT * FROM crosstab('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;') AS c(rowid text, att1 text, att2 text, att3 text, att4 text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | att1 | att2 | att3 | att4 -------+------+-------+-------+------- test1 | val1 | val2 | val3 | val4 @@ -138,6 +155,7 @@ AS '$libdir/tablefunc','crosstab' LANGUAGE C STABLE STRICT; SELECT * FROM crosstab_out('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' ORDER BY 1,2;'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | att1 | att2 | att3 -------+------+-------+------- test1 | val1 | val2 | val3 @@ -148,18 +166,22 @@ -- check error reporting SELECT * FROM crosstab('SELECT rowid, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;') AS ct(row_name text, category_1 text, category_2 text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab source data query DETAIL: The query must return 3 columns: row_name, category, and value. SELECT * FROM crosstab('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;') AS ct(row_name text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab return type DETAIL: Return row must have at least two columns. SELECT * FROM crosstab('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;') AS ct(row_name int, category_1 text, category_2 text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab return type DETAIL: Source row_name datatype text does not match return row_name datatype integer. SELECT * FROM crosstab('SELECT rowid, attribute, val FROM ct where rowclass = ''group1'' and (attribute = ''att2'' or attribute = ''att3'') ORDER BY 1,2;') AS ct(row_name text, category_1 text, category_2 int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab return type DETAIL: Source value datatype text does not match return value datatype integer in column 3. -- @@ -185,6 +207,7 @@ 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature text, test_result text, test_startdate text, volts text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate | volts -------+--------------------------+-------------+-------------+-----------------+--------- test1 | Sat Mar 01 00:00:00 2003 | 42 | PASS | | 2.6987 @@ -197,6 +220,7 @@ 'SELECT rowid, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text, temperature text, test_result text, test_startdate text, volts text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | temperature | test_result | test_startdate | volts -------+-------------+-------------+-----------------+--------- test1 | 42 | PASS | | 2.6987 @@ -209,6 +233,7 @@ 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature int4, test_result text, test_startdate timestamp, volts float8); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate | volts -------+--------------------------+-------------+-------------+--------------------------+--------- test1 | Sat Mar 01 00:00:00 2003 | 42 | PASS | | 2.6987 @@ -221,6 +246,7 @@ 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth WHERE attribute IN (''temperature'',''test_result'',''test_startdate'') ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature int4, test_result text, test_startdate timestamp); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate -------+--------------------------+-------------+-------------+-------------------------- test1 | Sat Mar 01 00:00:00 2003 | 42 | PASS | @@ -233,12 +259,14 @@ 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth WHERE attribute = ''a'' ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature int4, test_result text, test_startdate timestamp, volts float8); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: crosstab categories query must return at least one row -- if category query generates more than one column, get expected error SELECT * FROM crosstab( 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT rowdt, attribute FROM cth ORDER BY 2') AS c(rowid text, rowdt timestamp, temperature int4, test_result text, test_startdate timestamp, volts float8); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab categories query DETAIL: The query must return one column. -- if category query generates a NULL value, get expected error @@ -246,12 +274,14 @@ 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT NULL::text') AS c(rowid text, rowdt timestamp, temperature int4, test_result text, test_startdate timestamp, volts float8); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: crosstab category value must not be null -- if source query returns zero rows, get zero rows returned SELECT * FROM crosstab( 'SELECT rowid, rowdt, attribute, val FROM cth WHERE false ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature text, test_result text, test_startdate text, volts text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate | volts -------+-------+-------------+-------------+----------------+------- (0 rows) @@ -261,6 +291,7 @@ 'SELECT rowid, rowdt, attribute, val FROM cth WHERE false ORDER BY 1', 'SELECT DISTINCT attribute FROM cth WHERE false ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature text, test_result text, test_startdate text, volts text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate | volts -------+-------+-------------+-------------+----------------+------- (0 rows) @@ -270,12 +301,14 @@ 'SELECT rowid, attribute FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text, temperature text, test_result text, test_startdate text, volts text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab source data query DETAIL: The query must return at least 3 columns: row_name, category, and value. SELECT * FROM crosstab( 'SELECT rowid, rowdt, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text, rowdt timestamp, temperature int4, test_result text, test_startdate timestamp, volts float8); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab return type DETAIL: Return row must have 7 columns, not 6. -- check errors with inappropriate result rowtype @@ -283,6 +316,7 @@ 'SELECT rowid, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1') AS c(rowid text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid crosstab return type DETAIL: Return row must have at least two columns. -- check it works with a named result rowtype @@ -296,6 +330,7 @@ SELECT * FROM crosstab_named( 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate | volts -------+--------------------------+-------------+-------------+--------------------------+--------- test1 | Sat Mar 01 00:00:00 2003 | 42 | PASS | | 2.6987 @@ -314,6 +349,7 @@ SELECT * FROM crosstab_out( 'SELECT rowid, rowdt, attribute, val FROM cth ORDER BY 1', 'SELECT DISTINCT attribute FROM cth ORDER BY 1'); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree rowid | rowdt | temperature | test_result | test_startdate | volts -------+--------------------------+-------------+-------------+--------------------------+--------- test1 | Sat Mar 01 00:00:00 2003 | 42 | PASS | | 2.6987 @@ -329,6 +365,7 @@ \copy connectby_text from 'data/connectby_text.data' -- with branch, without orderby SELECT * FROM connectby('connectby_text', 'keyid', 'parent_keyid', 'row2', 0, '~') AS t(keyid text, parent_keyid text, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level | branch -------+--------------+-------+--------------------- row2 | | 0 | row2 @@ -341,6 +378,7 @@ -- without branch, without orderby SELECT * FROM connectby('connectby_text', 'keyid', 'parent_keyid', 'row2', 0) AS t(keyid text, parent_keyid text, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level -------+--------------+------- row2 | | 0 @@ -353,6 +391,7 @@ -- with branch, with orderby SELECT * FROM connectby('connectby_text', 'keyid', 'parent_keyid', 'pos', 'row2', 0, '~') AS t(keyid text, parent_keyid text, level int, branch text, pos int) ORDER BY t.pos; +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level | branch | pos -------+--------------+-------+---------------------+----- row2 | | 0 | row2 | 1 @@ -365,6 +404,7 @@ -- without branch, with orderby SELECT * FROM connectby('connectby_text', 'keyid', 'parent_keyid', 'pos', 'row2', 0) AS t(keyid text, parent_keyid text, level int, pos int) ORDER BY t.pos; +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level | pos -------+--------------+-------+----- row2 | | 0 | 1 @@ -380,6 +420,7 @@ \copy connectby_int from 'data/connectby_int.data' -- with branch SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid int, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level | branch -------+--------------+-------+--------- 2 | | 0 | 2 @@ -392,6 +433,7 @@ -- without branch SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid int, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level -------+--------------+------- 2 | | 0 @@ -408,9 +450,11 @@ INSERT INTO connectby_int VALUES(9,11); -- should fail due to infinite recursion SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid int, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: infinite recursion detected -- infinite recursion failure avoided by depth limit SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 4, '~') AS t(keyid int, parent_keyid int, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level | branch -------+--------------+-------+------------- 2 | | 0 | 2 @@ -425,44 +469,56 @@ -- should fail as first two columns must have the same type SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid text, parent_keyid int, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Source key type integer does not match return key type text. -- should fail as key field datatype should match return datatype SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid float8, parent_keyid float8, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Source key type integer does not match return key type double precision. SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid float8, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Source parent key type integer does not match return parent key type double precision. -- check other rowtype mismatch cases SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid int, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Return row must have 3 columns, not 4. SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid int, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Return row must have 4 columns, not 3. SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid text, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Source parent key type integer does not match return parent key type text. SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid int, level float, branch float); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Third return column (depth) must be type integer. SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid int, level int, branch float); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Fourth return column (branch) must be type text. SELECT * FROM connectby('connectby_text', 'keyid', 'parent_keyid', 'pos', 'row2', 0, '~') AS t(keyid text, parent_keyid text, level int, branch text, pos text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Fifth return column (serial) must be type integer. SELECT * FROM connectby('connectby_text', 'keyid', 'parent_keyid', 'pos', 'row2', 0) AS t(keyid text, parent_keyid text, level int, pos text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby return type DETAIL: Fourth return column (serial) must be type integer. -- tests for values using custom queries -- query with one column - failed SELECT * FROM connectby('connectby_int', '1; --', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid int, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: invalid connectby source data query DETAIL: The query must return at least two columns. -- query with two columns first value as NULL SELECT * FROM connectby('connectby_int', 'NULL::int, 1::int; --', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid int, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level -------+--------------+------- 2 | | 0 @@ -471,9 +527,11 @@ -- query with two columns second value as NULL SELECT * FROM connectby('connectby_int', '1::int, NULL::int; --', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid int, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree ERROR: infinite recursion detected -- query with two columns, both values as NULL SELECT * FROM connectby('connectby_int', 'NULL::int, NULL::int; --', 'parent_keyid', '2', 0) AS t(keyid int, parent_keyid int, level int); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level -------+--------------+------- 2 | | 0 @@ -489,6 +547,7 @@ INSERT INTO connectby_int VALUES(1,111); -- this should not fail due to recursion detection SELECT * FROM connectby('connectby_int', 'keyid', 'parent_keyid', '11', 0, '-') AS t(keyid int, parent_keyid int, level int, branch text); +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree keyid | parent_keyid | level | branch -------+--------------+-------+---------- 11 | | 0 | 11