Derive Macro pgrx::PostgresOrd

source ·
#[derive(PostgresOrd)]
{
    // 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, PartialEq, Eq,
     PartialOrd, Ord, PostgresEnum, PostgresOrd
)]
enum DogNames {
    Nami,
    Brandy,
}

Optionally accepts the following attributes:

§No bounds?

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