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

From: valgog <valgog(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: passing a temporary table with more than one column to a stored procedure
Date: 2008-04-29 08:30:07
Message-ID: 54b037c6-e6c4-4ad1-b036-c71c98b71d09@a70g2000hsh.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It looks like you need an aggregate function... but aggregate would
work in case, you want to return a RECORD and not a SETOF RECORD.

In this case, you probably need to operate with arrays. Are you on
8.3? If yes, you would be able to pass an array of type to your
function.

You can accumulate your type-array with array_accum(anyelement)
aggregate (http://www.postgresql.org/docs/8.3/static/xaggr.html)
but I am not sure about the memory consumption in case of large arrays
being passed to the function.

If you are in the 8.2, you can still convert any type to text, and
deconvert in the function: textin(point_out('(1,1)'::point))

With best regards,

-- Valentine

On Apr 28, 11:52 pm, rosen(dot)(dot)(dot)(at)informatik(dot)hu-berlin(dot)de (Viktor
Rosenfeld) wrote:
> 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?
>
> Viktor
>
> --
> Sent via pgsql-general mailing list (pgsql-gene(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gerhard Wohlgenannt 2008-04-29 08:46:06 question/problem concerning GRANT/REVOKE
Previous Message wstrzalka 2008-04-29 08:20:13 Re: PITR problem