Derive Macro pgx_macros::PostgresHash

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

Generate necessary code for stable hashing the type so it can be used with USING hash indexes.

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

Optionally accepts the following attributes: