Re: Returning large select results from stored procedures

From: Richard Huxton <dev(at)archonet(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Returning large select results from stored procedures
Date: 2004-01-15 16:04:02
Message-ID: 200401151604.02255.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 15 January 2004 15:02, Bill Moran wrote:
> I'm having a little trouble understanding how to do something. I assume
> I'm just missing it in the documentation, so a pointer to relevent docs
> would be as welcome as a direct answer.
>
> I have a project in which I'll need to create a number of stored procedures
> that are basically wrappers around complex SQL statements. Along the lines
> of:
...
> I keep getting these errors:
> ERROR: return type mismatch in function declared to return integer
> DETAIL: Final SELECT must return exactly one column.
> CONTEXT: SQL function "expired" during startup

Try SETOF subscription for this example - you're not telling it the type of
the result (which in your example is a row from subscription).

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message danfisher 2004-01-15 16:16:22 Re: Errors after power failure
Previous Message Richard Huxton 2004-01-15 16:01:27 Re: parse error in function