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>
Cc: <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 23:44:57
Message-ID: 1A6E6D554222284AB25ABE3229A92762E9A27D@nrtexcus702.int.asurion.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> -----Original Message-----
> From: Viktor Rosenfeld [mailto:rosenfel(at)informatik(dot)hu-berlin(dot)de]
> Sent: Monday, April 28, 2008 4:52 PM
> To: Roberts, Jon
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] passing a temporary table with more than one
column
> to a stored procedure
>
> Hi Jon,
>
> Am 28.04.2008 um 19:23 schrieb Roberts, Jon:
> >> What does the signature of graphovertokens look like? Three
> >> parmaters
> > and it doesn't return a setof?
>
> This is my problem. The return type is setof something (doesn't
> really matter), but I don't know what to put into the argument list.
>
> Any ideas?
>
You could pass in arrays to the function.

A less efficient way would be to create a temp table, loop through the
main result set and call your function one record at a time. Take the
results from each execution of the function and insert that into the
temp table. Then return the values from the temp table.

Jon

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gurjeet Singh 2008-04-29 01:01:30 Re: inheritance. more.
Previous Message postgre 2008-04-28 22:50:32 close database, nomount state