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 ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend