Re: Returning large select results from stored procedures - Mailing list pgsql-general

From Richard Huxton
Subject Re: Returning large select results from stored procedures
Date
Msg-id 200401151604.02255.dev@archonet.com
Whole thread Raw
In response to Returning large select results from stored procedures  (Bill Moran <wmoran@potentialtech.com>)
Responses Re: Returning large select results from stored procedures  (Bill Moran <wmoran@potentialtech.com>)
List 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

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: parse error in function
Next
From: Adrian Klaver
Date:
Subject: Re: Errors after power failure