Alright. I have a very large amount of columns being returned by this stored procedure that I ported from MS SQL to
Postgres. Now the problem I'm having is that when the select * from sp_whatever(1,0,3) as ( foo int, bar int, etc.) is
executedthe error "wrong record type supplied in RETURN NEXT CONTEXT". Now this immediately red flagged me to look at
thetypes that I was returning and verify that those were the types that I was catching in the as statement. I went
throughto verify all of the variables and they are all correct as far as both name and the exact type. Therefore there
areonly a few things left that I'm thinking could be the problem. <br /><br />1. Too many variables returned (there are
44variables being returned).<br />2. Some of the variables that are smallint in the select statement also do a if
isnulltype of logic that will return zero if they are null. (is that zero not coming back as a smallint then?) <br
/>3.What I'm declaring as a variable type in postgresql isn't the variable type in PHP. The following are the
differenttypes of variables that I use:<br />INT<br />SMALLINT<br />BIGINT (when I do a count(*))<br />VARCHAR(xx) <br
/>TEXT<br/>TIMESTAMP<br />NUMERIC(19,2)<br /><br /><br />Now the two there that I'm skeptical about are the timestamp
andthe numeric.<br /><br />Thanks ahead of time for any ideas,<br />Chris<br /><br />