Skip to content

PG_FUNCTION_ARGS #1

Open
Open
@thehydroimpulse

Description

@thehydroimpulse

This is used for postgres-compatible functions. The macro is simply:

// src/include/fmgr.h 
#define PG_FUNCTION_ARGS FunctionCallInfo fcinfo

And 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 {
    // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions