I am trying to create a custom C-language function for an Apache AGE extension in PostgreSQL, but I'm not sure how to handle a variable number of arguments of different types. Ideally, I would like to call this function using the syntax
SELECT function(arg1, arg2, ..., argN);
Can anyone provide guidance or examples of how to accomplish this? Here's some additional context:
- The function should be able to handle a variable number of arguments, with different types (e.g. integers, floats, strings, etc.).
- I am familiar with the basics of C programming, but I have limited experience with PostgreSQL extensions.
- I have already created a basic function in C that can be called from PostgreSQL, but it only accepts a fixed number of arguments of a specific type.
Any suggestions or pointers in the right direction would be greatly appreciated. Thanks in advance!