Module diesel::pg

source ·
Available on crate feature postgres_backend only.
Expand description

Provides types and functions related to working with PostgreSQL

Much of this module is re-exported from database agnostic locations. However, if you are writing code specifically to extend Diesel on PostgreSQL, you may need to work with this module directly.


  • Data structures for PG types which have no corresponding Rust type
  • PostgreSQL related query builder extensions
  • PostgreSQL specific SQL types



  • A decorator trait for OrderClause It helps to have bounds on either Col, Asc and Desc.
  • Determines the OID of types at runtime