[][src]Crate pgx_macros

Macros

extension_sql

Embed SQL directly into the generated extension script.

Attribute Macros

commutator

Used with #[pg_operator]. 1 value which is the function name

hashes

Used with #[pg_operator]. no values

initialize

Associated macro for #[pg_test] to provide context back to your test framework to indicate that the test system is being initialized

join

Used with #[pg_operator]. 1 value which is the function name

merges

Used with #[pg_operator]. no values

negator

Used with #[pg_operator]. 1 value which is the function name

opname

Used with #[pg_operator]. 1 value which is the operator name itself

pg_extern

Declare a function as #[pg_extern] to indicate that it can be used by Postgres as a UDF

pg_guard

Declare a function as #[pg_guard] to indcate that it is called from a Postgres extern "C" function so that Rust panic!()s (and Postgres elog(ERROR)s) will be properly handled by pgx

pg_operator

Declare a function as #[pg_operator] to indicate that it represents a Postgres operator cargo pgx schema will automatically generate the underlying SQL

pg_test

#[pg_test] functions are test functions (akin to #[test]), but they run in-process inside Postgres during cargo pgx test.

restrict

Used with #[pg_operator]. 1 value which is the function name

Derive Macros

PostgresEnum
PostgresEq
PostgresGucEnum
PostgresHash
PostgresOrd
PostgresType