@@ -446,6 +446,14 @@ pub enum DataType {
446446 ///
447447 /// [PostgreSQL]: https://www.postgresql.org/docs/9.5/functions-geometry.html
448448 GeometricType ( GeometricTypeKind ) ,
449+ /// PostgreSQL text search vectors, see [PostgreSQL].
450+ ///
451+ /// [PostgreSQL]: https://www.postgresql.org/docs/17/datatype-textsearch.html
452+ TsVector ,
453+ /// PostgreSQL text search query, see [PostgreSQL].
454+ ///
455+ /// [PostgreSQL]: https://www.postgresql.org/docs/17/datatype-textsearch.html
456+ TsQuery ,
449457}
450458
451459impl fmt:: Display for DataType {
@@ -658,7 +666,7 @@ impl fmt::Display for DataType {
658666 }
659667 DataType :: Enum ( vals, bits) => {
660668 match bits {
661- Some ( bits) => write ! ( f, "ENUM{}" , bits ) ,
669+ Some ( bits) => write ! ( f, "ENUM{bits}" ) ,
662670 None => write ! ( f, "ENUM" ) ,
663671 } ?;
664672 write ! ( f, "(" ) ?;
@@ -706,16 +714,16 @@ impl fmt::Display for DataType {
706714 }
707715 // ClickHouse
708716 DataType :: Nullable ( data_type) => {
709- write ! ( f, "Nullable({})" , data_type )
717+ write ! ( f, "Nullable({data_type })" )
710718 }
711719 DataType :: FixedString ( character_length) => {
712- write ! ( f, "FixedString({})" , character_length )
720+ write ! ( f, "FixedString({character_length })" )
713721 }
714722 DataType :: LowCardinality ( data_type) => {
715- write ! ( f, "LowCardinality({})" , data_type )
723+ write ! ( f, "LowCardinality({data_type })" )
716724 }
717725 DataType :: Map ( key_data_type, value_data_type) => {
718- write ! ( f, "Map({}, {})" , key_data_type , value_data_type )
726+ write ! ( f, "Map({key_data_type }, {value_data_type })" )
719727 }
720728 DataType :: Tuple ( fields) => {
721729 write ! ( f, "Tuple({})" , display_comma_separated( fields) )
@@ -737,7 +745,9 @@ impl fmt::Display for DataType {
737745 DataType :: NamedTable { name, columns } => {
738746 write ! ( f, "{} TABLE ({})" , name, display_comma_separated( columns) )
739747 }
740- DataType :: GeometricType ( kind) => write ! ( f, "{}" , kind) ,
748+ DataType :: GeometricType ( kind) => write ! ( f, "{kind}" ) ,
749+ DataType :: TsVector => write ! ( f, "TSVECTOR" ) ,
750+ DataType :: TsQuery => write ! ( f, "TSQUERY" ) ,
741751 }
742752 }
743753}
@@ -932,7 +942,7 @@ impl fmt::Display for CharacterLength {
932942 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
933943 match self {
934944 CharacterLength :: IntegerLength { length, unit } => {
935- write ! ( f, "{}" , length ) ?;
945+ write ! ( f, "{length}" ) ?;
936946 if let Some ( unit) = unit {
937947 write ! ( f, " {unit}" ) ?;
938948 }
@@ -987,7 +997,7 @@ impl fmt::Display for BinaryLength {
987997 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
988998 match self {
989999 BinaryLength :: IntegerLength { length } => {
990- write ! ( f, "{}" , length ) ?;
1000+ write ! ( f, "{length}" ) ?;
9911001 }
9921002 BinaryLength :: Max => {
9931003 write ! ( f, "MAX" ) ?;
0 commit comments