diff --git a/library/PostgresqlSyntax/Ast.hs b/library/PostgresqlSyntax/Ast.hs
--- a/library/PostgresqlSyntax/Ast.hs
+++ b/library/PostgresqlSyntax/Ast.hs
@@ -25,13 +25,13 @@
   | UpdatePreparableStmt UpdateStmt
   | DeletePreparableStmt DeleteStmt
   | CallPreparableStmt CallStmt
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Call
 
 newtype CallStmt
   = CallStmt FuncApplication
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Insert
 
@@ -43,7 +43,7 @@
 --       opt_on_conflict returning_clause
 -- @
 data InsertStmt = InsertStmt (Maybe WithClause) InsertTarget InsertRest (Maybe OnConflict) (Maybe ReturningClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -53,7 +53,7 @@
 --   | qualified_name AS ColId
 -- @
 data InsertTarget = InsertTarget QualifiedName (Maybe ColId)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -68,7 +68,7 @@
 data InsertRest
   = SelectInsertRest (Maybe InsertColumnList) (Maybe OverrideKind) SelectStmt
   | DefaultValuesInsertRest
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -78,7 +78,7 @@
 --   | SYSTEM_P
 -- @
 data OverrideKind = UserOverrideKind | SystemOverrideKind
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
 
 -- |
 -- ==== References
@@ -96,7 +96,7 @@
 --   | ColId opt_indirection
 -- @
 data InsertColumnItem = InsertColumnItem ColId (Maybe Indirection)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -107,7 +107,7 @@
 --   | EMPTY
 -- @
 data OnConflict = OnConflict (Maybe ConfExpr) OnConflictDo
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -120,7 +120,7 @@
 data OnConflictDo
   = UpdateOnConflictDo SetClauseList (Maybe WhereClause)
   | NothingOnConflictDo
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -133,7 +133,7 @@
 data ConfExpr
   = WhereConfExpr IndexParams (Maybe WhereClause)
   | ConstraintConfExpr Name
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -157,7 +157,7 @@
 --       returning_clause
 -- @
 data UpdateStmt = UpdateStmt (Maybe WithClause) RelationExprOptAlias SetClauseList (Maybe FromClause) (Maybe WhereOrCurrentClause) (Maybe ReturningClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -178,7 +178,7 @@
 data SetClause
   = TargetSetClause SetTarget AExpr
   | TargetListSetClause SetTargetList AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -187,7 +187,7 @@
 --   | ColId opt_indirection
 -- @
 data SetTarget = SetTarget ColId (Maybe Indirection)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -208,7 +208,7 @@
 --       using_clause where_or_current_clause returning_clause
 -- @
 data DeleteStmt = DeleteStmt (Maybe WithClause) RelationExprOptAlias (Maybe UsingClause) (Maybe WhereOrCurrentClause) (Maybe ReturningClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -240,7 +240,7 @@
 data SelectWithParens
   = NoParensSelectWithParens SelectNoParens
   | WithParensSelectWithParens SelectWithParens
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- Covers the following cases:
@@ -258,7 +258,7 @@
 -- @
 data SelectNoParens
   = SelectNoParens (Maybe WithClause) SelectClause (Maybe SortClause) (Maybe SelectLimit) (Maybe ForLockingClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- @
@@ -289,7 +289,7 @@
   | ValuesSimpleSelect ValuesClause
   | TableSimpleSelect RelationExpr
   | BinSimpleSelect SelectBinOp SelectClause (Maybe Bool) SelectClause
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- Covers these parts of spec:
@@ -312,7 +312,7 @@
   = NormalTargeting TargetList
   | AllTargeting (Maybe TargetList)
   | DistinctTargeting (Maybe ExprList) TargetList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -337,7 +337,7 @@
   | ImplicitlyAliasedExprTargetEl AExpr Ident
   | ExprTargetEl AExpr
   | AsteriskTargetEl
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -347,7 +347,7 @@
 --   |  select_clause EXCEPT all_or_distinct select_clause
 -- @
 data SelectBinOp = UnionSelectBinOp | IntersectSelectBinOp | ExceptSelectBinOp
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -358,7 +358,7 @@
 --   |  WITH RECURSIVE cte_list
 -- @
 data WithClause = WithClause Bool (NonEmpty CommonTableExpr)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -371,7 +371,7 @@
 --   | EMPTY
 -- @
 data CommonTableExpr = CommonTableExpr Ident (Maybe (NonEmpty Ident)) (Maybe Bool) PreparableStmt
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 type IntoClause = OptTempTableName
 
@@ -399,7 +399,7 @@
   | UnloggedOptTempTableName Bool QualifiedName
   | TableOptTempTableName QualifiedName
   | QualifedOptTempTableName QualifiedName
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 type FromClause = NonEmpty TableRef
 
@@ -429,7 +429,7 @@
   | RollupGroupByItem ExprList
   | CubeGroupByItem ExprList
   | GroupingSetsGroupByItem (NonEmpty GroupByItem)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- @
@@ -457,7 +457,7 @@
 --   |  ColId AS window_specification
 -- @
 data WindowDefinition = WindowDefinition Ident WindowSpecification
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- @
@@ -474,7 +474,7 @@
 --   |  EMPTY
 -- @
 data WindowSpecification = WindowSpecification (Maybe ExistingWindowName) (Maybe PartitionClause) (Maybe SortClause) (Maybe FrameClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 type ExistingWindowName = ColId
 
@@ -490,7 +490,7 @@
 --   |  EMPTY
 -- @
 data FrameClause = FrameClause FrameClauseMode FrameExtent (Maybe WindowExclusionClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -502,7 +502,7 @@
 --   |  EMPTY
 -- @
 data FrameClauseMode = RangeFrameClauseMode | RowsFrameClauseMode | GroupsFrameClauseMode
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -512,7 +512,7 @@
 --   |  BETWEEN frame_bound AND frame_bound
 -- @
 data FrameExtent = SingularFrameExtent FrameBound | BetweenFrameExtent FrameBound FrameBound
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -530,7 +530,7 @@
   | CurrentRowFrameBound
   | PrecedingFrameBound AExpr
   | FollowingFrameBound AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -547,7 +547,7 @@
   | GroupWindowExclusionClause
   | TiesWindowExclusionClause
   | NoOthersWindowExclusionClause
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -578,7 +578,7 @@
 data SortBy
   = UsingSortBy AExpr QualAllOp (Maybe NullsOrder)
   | AscDescSortBy AExpr (Maybe AscDesc) (Maybe NullsOrder)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -594,7 +594,7 @@
   | OffsetLimitSelectLimit OffsetClause LimitClause
   | LimitSelectLimit LimitClause
   | OffsetSelectLimit OffsetClause
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -616,7 +616,7 @@
 data LimitClause
   = LimitLimitClause SelectLimitValue (Maybe AExpr)
   | FetchOnlyLimitClause Bool (Maybe SelectFetchFirstValue) Bool
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -629,7 +629,7 @@
 data SelectFetchFirstValue
   = ExprSelectFetchFirstValue CExpr
   | NumSelectFetchFirstValue Bool (Either Int64 Double)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -641,7 +641,7 @@
 data SelectLimitValue
   = ExprSelectLimitValue AExpr
   | AllSelectLimitValue
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -658,7 +658,7 @@
 data OffsetClause
   = ExprOffsetClause AExpr
   | FetchFirstOffsetClause SelectFetchFirstValue Bool
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * For Locking
 
@@ -675,7 +675,7 @@
 data ForLockingClause
   = ItemsForLockingClause (NonEmpty ForLockingItem)
   | ReadOnlyForLockingClause
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -691,7 +691,7 @@
 --   | EMPTY
 -- @
 data ForLockingItem = ForLockingItem ForLockingStrength (Maybe (NonEmpty QualifiedName)) (Maybe Bool)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -707,7 +707,7 @@
   | NoKeyUpdateForLockingStrength
   | ShareForLockingStrength
   | KeyForLockingStrength
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Table references and joining
 
@@ -761,7 +761,7 @@
     --    | '(' joined_table ')' alias_clause
     -- @
     JoinTableRef JoinedTable (Maybe AliasClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -782,7 +782,7 @@
       QualifiedName
       -- | Are parentheses present?
       Bool
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -793,7 +793,7 @@
 --   | relation_expr AS ColId
 -- @
 data RelationExprOptAlias = RelationExprOptAlias RelationExpr (Maybe (Bool, ColId))
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -802,7 +802,7 @@
 --   | TABLESAMPLE func_name '(' expr_list ')' opt_repeatable_clause
 -- @
 data TablesampleClause = TablesampleClause FuncName ExprList (Maybe RepeatableClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -823,7 +823,7 @@
 data FuncTable
   = FuncExprFuncTable FuncExprWindowless OptOrdinality
   | RowsFromFuncTable RowsfromList OptOrdinality
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -832,7 +832,7 @@
 --   | func_expr_windowless opt_col_def_list
 -- @
 data RowsfromItem = RowsfromItem FuncExprWindowless (Maybe ColDefList)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -877,7 +877,7 @@
 --   | ColId Typename opt_collate_clause
 -- @
 data TableFuncElement = TableFuncElement ColId Typename (Maybe CollateClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -898,7 +898,7 @@
 --   |  ColId
 -- @
 data AliasClause = AliasClause Bool ColId (Maybe NameList)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -915,7 +915,7 @@
   | AsFuncAliasClause TableFuncElementList
   | AsColIdFuncAliasClause ColId TableFuncElementList
   | ColIdFuncAliasClause ColId TableFuncElementList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -932,7 +932,7 @@
 data JoinedTable
   = InParensJoinedTable JoinedTable
   | MethJoinedTable JoinMeth TableRef TableRef
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -947,7 +947,7 @@
   = CrossJoinMeth
   | QualJoinMeth (Maybe JoinType) JoinQual
   | NaturalJoinMeth (Maybe JoinType)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -962,7 +962,7 @@
   | LeftJoinType Bool
   | RightJoinType Bool
   | InnerJoinType
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -974,7 +974,7 @@
 data JoinQual
   = UsingJoinQual (NonEmpty Ident)
   | OnJoinQual AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Where
 
@@ -990,7 +990,7 @@
 data WhereOrCurrentClause
   = ExprWhereOrCurrentClause AExpr
   | CursorWhereOrCurrentClause CursorName
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Expression
 
@@ -1086,7 +1086,7 @@
   | SubqueryAExpr AExpr SubqueryOp SubType (Either SelectWithParens AExpr)
   | UniqueAExpr SelectWithParens
   | DefaultAExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1126,7 +1126,7 @@
   | SymbolicBinOpBExpr BExpr SymbolicExprBinOp BExpr
   | QualOpBExpr QualOp BExpr
   | IsOpBExpr BExpr Bool BExprIsOp
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1160,7 +1160,7 @@
   | ExplicitRowCExpr ExplicitRow
   | ImplicitRowCExpr ImplicitRow
   | GroupingCExpr ExprList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1172,7 +1172,7 @@
 data InExpr
   = SelectInExpr SelectWithParens
   | ExprListInExpr ExprList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1183,7 +1183,7 @@
 --   | ALL
 -- @
 data SubType = AnySubType | SomeSubType | AllSubType
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
 
 -- |
 -- ==== References
@@ -1197,7 +1197,7 @@
   = ExprListArrayExpr ExprList
   | ArrayExprListArrayExpr ArrayExprList
   | EmptyArrayExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1219,7 +1219,7 @@
 data Row
   = ExplicitRowRow ExplicitRow
   | ImplicitRowRow ImplicitRow
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1237,7 +1237,7 @@
 --   | '(' expr_list ',' a_expr ')'
 -- @
 data ImplicitRow = ImplicitRow ExprList AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1249,7 +1249,7 @@
 data FuncExpr
   = ApplicationFuncExpr FuncApplication (Maybe WithinGroupClause) (Maybe FilterClause) (Maybe OverClause)
   | SubexprFuncExpr FuncExprCommonSubexpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1261,7 +1261,7 @@
 data FuncExprWindowless
   = ApplicationFuncExprWindowless FuncApplication
   | CommonSubexprFuncExprWindowless FuncExprCommonSubexpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1292,7 +1292,7 @@
 data OverClause
   = WindowOverClause WindowSpecification
   | ColIdOverClause ColId
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1367,7 +1367,7 @@
   | CoalesceFuncExprCommonSubexpr ExprList
   | GreatestFuncExprCommonSubexpr ExprList
   | LeastFuncExprCommonSubexpr ExprList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1377,7 +1377,7 @@
 --   | EMPTY
 -- @
 data ExtractList = ExtractList ExtractArg AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1401,7 +1401,7 @@
   | MinuteExtractArg
   | SecondExtractArg
   | SconstExtractArg Sconst
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1411,7 +1411,7 @@
 --   | a_expr overlay_placing substr_from
 -- @
 data OverlayList = OverlayList AExpr OverlayPlacing SubstrFrom (Maybe SubstrFor)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1429,7 +1429,7 @@
 --   | EMPTY
 -- @
 data PositionList = PositionList BExpr BExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1445,7 +1445,7 @@
 data SubstrList
   = ExprSubstrList AExpr SubstrListFromFor
   | ExprListSubstrList ExprList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1460,7 +1460,7 @@
   | ForFromSubstrListFromFor SubstrFor SubstrFrom
   | FromSubstrListFromFor SubstrFrom
   | ForSubstrListFromFor SubstrFor
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1486,7 +1486,7 @@
 --   | TRIM '(' TRAILING trim_list ')'
 -- @
 data TrimModifier = BothTrimModifier | LeadingTrimModifier | TrailingTrimModifier
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
 
 -- |
 -- ==== References
@@ -1500,7 +1500,7 @@
   = ExprFromExprListTrimList AExpr ExprList
   | FromExprListTrimList ExprList
   | ExprListTrimList ExprList
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1509,7 +1509,7 @@
 --   | CASE case_arg when_clause_list case_default END_P
 -- @
 data CaseExpr = CaseExpr (Maybe CaseArg) WhenClauseList (Maybe CaseDefault)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1545,7 +1545,7 @@
 --   |  WHEN a_expr THEN a_expr
 -- @
 data WhenClause = WhenClause AExpr AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1560,7 +1560,7 @@
 --   |  func_name '(' '*' ')'
 -- @
 data FuncApplication = FuncApplication FuncName (Maybe FuncApplicationParams)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1578,13 +1578,13 @@
   = NormalFuncApplicationParams (Maybe Bool) (NonEmpty FuncArgExpr) (Maybe SortClause)
   | VariadicFuncApplicationParams (Maybe (NonEmpty FuncArgExpr)) FuncArgExpr (Maybe SortClause)
   | StarFuncApplicationParams
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 data FuncArgExpr
   = ExprFuncArgExpr AExpr
   | ColonEqualsFuncArgExpr Ident AExpr
   | EqualsGreaterFuncArgExpr Ident AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Constants
 
@@ -1625,7 +1625,7 @@
   | IntIntervalAexprConst Iconst Sconst
   | BoolAexprConst Bool
   | NullAexprConst
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1633,7 +1633,7 @@
 --   |  func_name '(' func_arg_list opt_sort_clause ')' Sconst
 -- @
 data FuncConstArgs = FuncConstArgs (NonEmpty FuncArgExpr) (Maybe SortClause)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1649,7 +1649,7 @@
   | ConstBitConstTypename ConstBit
   | ConstCharacterConstTypename ConstCharacter
   | ConstDatetimeConstTypename ConstDatetime
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1685,7 +1685,7 @@
   | DecNumeric (Maybe TypeModifiers)
   | NumericNumeric (Maybe TypeModifiers)
   | BooleanNumeric
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1702,7 +1702,7 @@
 --   | BIT opt_varying
 -- @
 data Bit = Bit OptVarying (Maybe ExprList)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 type ConstBit = Bit
 
@@ -1730,7 +1730,7 @@
 --   | character
 -- @
 data ConstCharacter = ConstCharacter Character (Maybe Int64)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1750,7 +1750,7 @@
   | NationalCharacterCharacter OptVarying
   | NationalCharCharacter OptVarying
   | NcharCharacter OptVarying
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1764,7 +1764,7 @@
 data ConstDatetime
   = TimestampConstDatetime (Maybe Int64) (Maybe Timezone)
   | TimeConstDatetime (Maybe Int64) (Maybe Timezone)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1809,7 +1809,7 @@
   | HourToMinuteInterval
   | HourToSecondInterval IntervalSecond
   | MinuteToSecondInterval IntervalSecond
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1828,7 +1828,7 @@
 -- IDENT
 -- @
 data Ident = QuotedIdent Text | UnquotedIdent Text
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1885,7 +1885,7 @@
 --   | ColId indirection
 -- @
 data Columnref = Columnref ColId (Maybe Indirection)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1895,7 +1895,7 @@
 --   | ColId attrs
 -- @
 data AnyName = AnyName ColId (Maybe Attrs)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1907,7 +1907,7 @@
 data FuncName
   = TypeFuncName TypeFunctionName
   | IndirectedFuncName ColId Indirection
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1932,7 +1932,7 @@
 data QualifiedName
   = SimpleQualifiedName Ident
   | IndirectedQualifiedName Ident Indirection
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -1960,7 +1960,7 @@
   | AllIndirectionEl
   | ExprIndirectionEl AExpr
   | SliceIndirectionEl (Maybe AExpr) (Maybe AExpr)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Types
 
@@ -1988,7 +1988,7 @@
       Bool
       -- | Array dimensions possibly followed by a question mark
       (Maybe (TypenameArrayDimensions, Bool))
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2001,7 +2001,7 @@
 data TypenameArrayDimensions
   = BoundsTypenameArrayDimensions ArrayBounds
   | ExplicitTypenameArrayDimensions (Maybe Iconst)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2034,7 +2034,7 @@
   | CharacterSimpleTypename Character
   | ConstDatetimeSimpleTypename ConstDatetime
   | ConstIntervalSimpleTypename (Either (Maybe Interval) Iconst)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2044,7 +2044,7 @@
 --   | type_function_name attrs opt_type_modifiers
 -- @
 data GenericType = GenericType TypeFunctionName (Maybe Attrs) (Maybe TypeModifiers)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2093,7 +2093,7 @@
 data QualOp
   = OpQualOp Op
   | OperatorQualOp AnyOperator
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2105,7 +2105,7 @@
 data QualAllOp
   = AllQualAllOp AllOp
   | AnyQualAllOp AnyOperator
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2145,7 +2145,7 @@
 data AnyOperator
   = AllOpAnyOperator AllOp
   | QualifiedAnyOperator ColId AnyOperator
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2157,7 +2157,7 @@
 data AllOp
   = OpAllOp Op
   | MathAllOp MathOp
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2190,18 +2190,18 @@
   | GreaterEqualsMathOp
   | ArrowLeftArrowRightMathOp
   | ExclamationEqualsMathOp
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
 
 data SymbolicExprBinOp
   = MathSymbolicExprBinOp MathOp
   | QualSymbolicExprBinOp QualOp
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 data VerbalExprBinOp
   = LikeVerbalExprBinOp
   | IlikeVerbalExprBinOp
   | SimilarToVerbalExprBinOp
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
 
 -- |
 -- ==== References
@@ -2228,7 +2228,7 @@
   | BetweenSymmetricAExprReversableOp BExpr AExpr
   | InAExprReversableOp InExpr
   | DocumentAExprReversableOp
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2244,7 +2244,7 @@
   = DistinctFromBExprIsOp BExpr
   | OfBExprIsOp TypeList
   | DocumentBExprIsOp
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2262,7 +2262,7 @@
   | AnySubqueryOp AnyOperator
   | LikeSubqueryOp Bool
   | IlikeSubqueryOp Bool
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- * Indexes
 
@@ -2284,7 +2284,7 @@
 --   | '(' a_expr ')' opt_collate opt_class opt_asc_desc opt_nulls_order
 -- @
 data IndexElem = IndexElem IndexElemDef (Maybe Collate) (Maybe Class) (Maybe AscDesc) (Maybe NullsOrder)
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2297,7 +2297,7 @@
   = IdIndexElemDef ColId
   | FuncIndexElemDef FuncExprWindowless
   | ExprIndexElemDef AExpr
-  deriving (Show, Generic, Eq, Ord)
+  deriving (Show, Generic, Eq, Ord, Data)
 
 -- |
 -- ==== References
@@ -2326,7 +2326,7 @@
 --   | EMPTY
 -- @
 data AscDesc = AscAscDesc | DescAscDesc
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
 
 -- |
 -- ==== References
@@ -2337,4 +2337,4 @@
 --   | EMPTY
 -- @
 data NullsOrder = FirstNullsOrder | LastNullsOrder
-  deriving (Show, Generic, Eq, Ord, Enum, Bounded)
+  deriving (Show, Generic, Eq, Ord, Data, Enum, Bounded)
diff --git a/postgresql-syntax.cabal b/postgresql-syntax.cabal
--- a/postgresql-syntax.cabal
+++ b/postgresql-syntax.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: postgresql-syntax
-version: 0.4.4.0
+version: 0.4.5.0
 category: Database, PostgreSQL, Parsing
 synopsis: PostgreSQL AST parsing and rendering
 description:
