I need to migrate some plpgsql functions I have to C language. These functions execute queries and process the results inside, and some of them return records... I've been reading the documentation, but I would like any of you to tell me where can I find some examples of these kind of functions (in C or C++).