Skip to main content

text_preserves_uniqueness

Function text_preserves_uniqueness 

Source
pub(crate) fn text_preserves_uniqueness(ty: &SqlScalarType) -> bool
Expand description

Reports whether rendering values of type ty as text maps distinct values to distinct strings.

Values of time, timestamp and timestamptz can carry nanoseconds, for example from date + time, but their text form is rounded to microseconds. Any type that contains one of them is therefore not uniqueness-preserving.