I need to return two arrays of integers in a C-language function for postgresql. Afaik, the best way to return two arrays of integers in a postgresql function is to declare the function with OUT parameters. But how to return two output parameters in a C-language function for postgresql? Should I return a tuple of two strings containing brace representations of the arrays?
Share
You have to return tuple of two arrays. In reality Postgresql’s function returns only one parameter every time. It is relative complex task, but it is possible. You can find some examples – google keyword is PG_RETURN_HEAPTUPLEHEADER