Skip site navigation (1) Skip section navigation (2)

Re: passing a temporary table with more than one column to a stored procedure

From: "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
To: "Viktor Rosenfeld" <rosenfel(at)informatik(dot)hu-berlin(dot)de>,<pgsql-general(at)postgresql(dot)org>
Subject: Re: passing a temporary table with more than one column to a stored procedure
Date: 2008-04-28 17:23:34
Message-ID: 1A6E6D554222284AB25ABE3229A92762E9A266@nrtexcus702.int.asurion.com (view raw or flat)
Thread:
Lists: pgsql-general
> is there a way to pass a temporary result table with more than column
> to a stored procedure?
> 
> Specifically, I would like to run a variation of this query:
> 
> SELECT
> 	*
> FROM
> 	graphOverTokens(
> 		(
> 			SELECT 1 AS min, 10 AS max, 2 AS text_ref
> 			UNTION SELECT 20 AS min, 30 AS max, 3 AS
text_ref
> 		) AS boundaries
> 		JOIN struct ON (struct.text_ref = boundaries.text_ref)
> 		JOIN rank ON (rank.struct_ref = struct.id)
> 	) AS graph
> 

What does the signature of graphovertokens look like?  Three parmaters
and it doesn't return a setof?


select graphovertokens(graph.min, graph.max, graph.text_ref), *
from (
 		(
 			SELECT 1 AS min, 10 AS max, 2 AS text_ref
 			UNTION SELECT 20 AS min, 30 AS max, 3 AS
text_ref
 		) AS boundaries
 		JOIN struct ON (struct.text_ref = boundaries.text_ref)
 		JOIN rank ON (rank.struct_ref = struct.id)
 	) AS graph



Jon

In response to

Responses

pgsql-general by date

Next:From: Guillaume LelargeDate: 2008-04-28 17:40:40
Subject: Re: varchar or text
Previous:From: AndrusDate: 2008-04-28 17:05:45
Subject: Sorting nulls and empty strings together

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group