pgtap
pgtap copied to clipboard
End user functions to test RETURNS TABLE functions
Put in new file because not sure where this would go in the repo. Provided documentation snippets as found on the website. The following variations are as follows:
- Ability to test table returns by providing an array of argument names AND and array of the arguments corresponding types in the returned table.
- Ability to test table returns by providing an array of argument names in the returned table.
- Ability to test table returns by providing an array of argument types in the returned table.
The above code could be expanded to cover out types, in types, variadic types, and inout types. There might be a way to reduce the amount of repeat code through clever case statements but I am unsure if that is the design approach taken with the rest of the project.