PG_FUNCTION_ARGS
thehydroimpulse opened this issue · 0 comments
thehydroimpulse commented
This is used for postgres-compatible functions. The macro is simply:
// src/include/fmgr.h
#define PG_FUNCTION_ARGS FunctionCallInfo fcinfoAnd you'd use it as:
Datum hello( PG_FUNCTION_ARGS );We just need to define all the structures from C in Rust and we can define the function:
extern fn foobar(args: FunctionCallInfo) -> Datum {
// ...
}