pub fn general_to_text(elem: impl ToText, writer: &mut impl Write)
For most of the types, cast them to varchar is the same as their pgwire “TEXT” format. So we use ToText to cast type to varchar.
ToText