From 6aa4482f2f520bb06fa1016eef3960f80bf88bdf Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 2 Sep 2002 05:44:05 +0000 Subject: Attached is an update to contrib/tablefunc. It introduces a new function, connectby(), which can serve as a reference implementation for the changes made in the last few days -- namely the ability of a function to return an entire tuplestore, and the ability of a function to make use of the query provided "expected" tuple description. Description: connectby(text relname, text keyid_fld, text parent_keyid_fld, text start_with, int max_depth [, text branch_delim]) - returns keyid, parent_keyid, level, and an optional branch string - requires anonymous composite type syntax in the FROM clause. See the instructions in the documentation below. Joe Conway --- contrib/tablefunc/tablefunc.sql.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'contrib/tablefunc/tablefunc.sql.in') diff --git a/contrib/tablefunc/tablefunc.sql.in b/contrib/tablefunc/tablefunc.sql.in index 7d599d4f08c..92bb5927d18 100644 --- a/contrib/tablefunc/tablefunc.sql.in +++ b/contrib/tablefunc/tablefunc.sql.in @@ -37,4 +37,12 @@ CREATE OR REPLACE FUNCTION crosstab4(text) CREATE OR REPLACE FUNCTION crosstab(text,int) RETURNS setof record - AS 'MODULE_PATHNAME','crosstab' LANGUAGE 'c' STABLE STRICT; \ No newline at end of file + AS 'MODULE_PATHNAME','crosstab' LANGUAGE 'c' STABLE STRICT; + +CREATE OR REPLACE FUNCTION connectby(text,text,text,text,int,text) + RETURNS setof record + AS 'MODULE_PATHNAME','connectby_text' LANGUAGE 'c' STABLE STRICT; + +CREATE OR REPLACE FUNCTION connectby(text,text,text,text,int) + RETURNS setof record + AS 'MODULE_PATHNAME','connectby_text' LANGUAGE 'c' STABLE STRICT; -- cgit v1.2.3