Derive Macro pgrx::PostgresEq

source ·
#[derive(PostgresEq)]
{
    // Attributes available to this derive:
    #[pgrx]
}
Expand description

Generate necessary code using the type in operators like == and !=.

use pgrx::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, PostgresEnum, PartialEq, Eq, PostgresEq)]
enum DogNames {
    Nami,
    Brandy,
}

Optionally accepts the following attributes:

§No bounds?

Unlike some derives, this does not implement a “real” Rust trait, thus PostgresEq cannot be used in trait bounds, nor can it be manually implemented.