Closed born-in-brooklyn closed 6 years ago
Thanks for the helpful bug report! I hadn't encountered a stored proc that had RETURN TABLE(...)
until seeing this, so it just wasn't being handled correctly.
Your example should work now, though I didn't seek out other examples different from yours to ensure it also handled them -- so please feel free to open another ticket with a failing example if you have more! The fix is included in the latest gem release, v2.2.2.
piggly seems to have problems with procedures that return table types. A procedure with this signature:
produces a cache index like this:
piggly trace produces this error:
It seems like the rewriting is putting one of the table columns in as another input parameter instead of creating a table parameter.