Skip to content

Commit

Permalink
Add type mapping for 'pg_sys::TimestampTz' to 'timestamp with time zone'
Browse files Browse the repository at this point in the history
This allows the `pg_sys::TimestampTz' type to be used in function
signatures, providing zero-cost access to the underlying i64 timestamp
of a 'timestamp with time zone' field.
  • Loading branch information
JamesGuthrie committed Jan 25, 2022
1 parent de8ce98 commit c8ecf0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pgx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ pub static DEFAULT_SOURCE_ONLY_SQL_MAPPING: Lazy<HashSet<RustSourceOnlySqlMappin
let mut m = HashSet::new();

map_source_only!(m, pg_sys::Oid, "Oid");
map_source_only!(m, pg_sys::TimestampTz, "timestamp with time zone");

m
});
Expand Down

0 comments on commit c8ecf0c

Please sign in to comment.