I have tried to locate a source for MonetDB function signatures. Some can be found by querying the sys.functions table, but date and time functions are missing the signatures. for instance if you look at the "month" function in that table there are 4 listed in the table.
| id | name | func | mod | lang | type | side_e | varres | vararg |>
: : : : : uage : : ffect : : :>
+======+============+=======+=======+======+======+========+========+======== +
| 901 | month | month | mtime | 0 | 1 | false | false | false |
| 910 | month | month | mtime | 0 | 1 | false | false | false |
| 916 | month | month | mtime | 0 | 1 | false | false | false |
| 922 | month | month | mtime | 0 | 1 | false | false | false |
| 930 | dayofmonth | day | mtime | 0 | 1 | false | false | false |
+------+------------+-------+-------+------+------+--------+--------+--------
I took a guess that "month" could be used like:
SELECT "month"(now());
And I was right - but I cannot find a list of the parameter the "month" functions take or what exactly they return.
This question is not only about "month" I would like a source to find the function utilization for all functions in the sys.function table.
Other RDBMS vendor have fleshed-out explanations for these types of functions - I find nothing like this for MonetDB, I can only assume I am looking in the wrong place. I read their documentation on the website and searched their website for this info, but I cannot find it.
Thank you
You can find the parameters/return types of functions in the sys.args table. You can join this table together with the sys.functions table to get the parameters/return types of a specific function.
For example, to get the valid parameters of the month function as well as its return type the following query can be used.
We can see that there are four functions called month. They all return an integer (res_0), and take either a date, timestamp, timestamptz or month_interval as parameter (arg_1).