Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux