Skip to content

Latest commit

 

History

History
 
 

pgx-examples

pgx-examples

This directory contains examples of how to work with various aspects of pgx.

  • arrays/: Working with Arrays
  • bad_ideas/: Some "bad ideas" to do in Postgres extensions
  • bgworker/: A simple Background Worker example
  • bytea/: Working with Postgres' bytea type as Vec<u8> and &[u8] in Rust
  • custom_types/: Create your own custom Postgres types backed by Rust structs/enums
  • errors/: Error handling using Postgres or Rust errors/panics
  • operators/: Creating operator functions and associated CREATE OPERATOR/OPERATOR CLASS/OPERATOR FAMILY DDL
  • shmem/: Postgres Shared Memory support
  • schemas/: How pgx uses Postgres schemas
  • srf/: Set-Returning-Functions
  • spi/: Using Postgres' Server Programming Interface (SPI)
  • strings/: Using Postgres text/varlena types as Rust Strings and &strs