@@ -1469,22 +1469,22 @@ class Aggregate expr1 expr2 aggr
14691469 sum_
14701470 :: ty `In` PGNum
14711471 => expr1 (nullity ty)
1472− -> aggr (nullity ty)
1472+ -> aggr ('Null ty)
14731473
14741474 -- | input values, including nulls, concatenated into an array
14751475 arrayAgg
14761476 :: expr1 ty
1477− -> aggr ('NotNull ('PGvararray ty))
1477+ -> aggr ('Null ('PGvararray ty))
14781478
14791479 -- | aggregates values as a JSON array
14801480 jsonAgg
14811481 :: expr1 ty
1482− -> aggr ('NotNull 'PGjson)
1482+ -> aggr ('Null 'PGjson)
14831483
14841484 -- | aggregates values as a JSON array
14851485 jsonbAgg
14861486 :: expr1 ty
1487− -> aggr ('NotNull 'PGjsonb)
1487+ -> aggr ('Null 'PGjsonb)
14881488
14891489 -- | >>> :{
14901490 -- let
@@ -1497,7 +1497,7 @@ class Aggregate expr1 expr2 aggr
14971497 :: int `In` PGIntegral
14981498 => expr1 (nullity int)
14991499 -- ^ what to aggregate
1500− -> aggr (nullity int)
1500+ -> aggr ('Null int)
15011501
15021502 -- | >>> :{
15031503 -- let
@@ -1510,7 +1510,7 @@ class Aggregate expr1 expr2 aggr
15101510 :: int `In` PGIntegral
15111511 => expr1 (nullity int)
15121512 -- ^ what to aggregate
1513− -> aggr (nullity int)
1513+ -> aggr ('Null int)
15141514
15151515 -- | >>> :{
15161516 -- let
@@ -1522,7 +1522,7 @@ class Aggregate expr1 expr2 aggr
15221522 boolAnd
15231523 :: expr1 (nullity 'PGbool)
15241524 -- ^ what to aggregate
1525− -> aggr (nullity 'PGbool)
1525+ -> aggr ('Null 'PGbool)
15261526
15271527 -- | >>> :{
15281528 -- let
@@ -1534,7 +1534,7 @@ class Aggregate expr1 expr2 aggr
15341534 boolOr
15351535 :: expr1(nullity 'PGbool)
15361536 -- ^ what to aggregate
1537− -> aggr (nullity 'PGbool)
1537+ -> aggr ('Null 'PGbool)
15381538
15391539 -- | synonym for `boolAnd`
15401540 --
@@ -1548,25 +1548,25 @@ class Aggregate expr1 expr2 aggr
15481548 every
15491549 :: expr1 (nullity 'PGbool)
15501550 -- ^ what to aggregate
1551− -> aggr (nullity 'PGbool)
1551+ -> aggr ('Null 'PGbool)
15521552
15531553 -- | maximum value of expression across all input values
15541554 max_
15551555 :: expr1 (nullity ty)
15561556 -- ^ what to maximize
1557− -> aggr (nullity ty)
1557+ -> aggr ('Null ty)
15581558
15591559 -- | minimum value of expression across all input values
15601560 min_
15611561 :: expr1 (nullity ty)
15621562 -- ^ what to minimize
1563− -> aggr (nullity ty)
1563+ -> aggr ('Null ty)
15641564
15651565 -- | average aggregation
15661566 avg
15671567 :: expr1 (nullity ty)
15681568 -- ^ what to average
1569− -> aggr (nullity (PGAvg ty))
1569+ -> aggr ('Null (PGAvg ty))
15701570
15711571 {- | correlation coefficient
15721572 >>> :{
@@ -1579,7 +1579,7 @@ class Aggregate expr1 expr2 aggr
15791579 -}
15801580 corr
15811581 :: expr2 (nullity 'PGfloat8)
1582− -> aggr (nullity 'PGfloat8)
1582+ -> aggr ('Null 'PGfloat8)
15831583
15841584 {- | population covariance
15851585 >>> :{
@@ -1592,7 +1592,7 @@ class Aggregate expr1 expr2 aggr
15921592 -}
15931593 covarPop
15941594 :: expr2 (nullity 'PGfloat8)
1595− -> aggr (nullity 'PGfloat8)
1595+ -> aggr ('Null 'PGfloat8)
15961596
15971597 {- | sample covariance
15981598 >>> :{
@@ -1605,7 +1605,7 @@ class Aggregate expr1 expr2 aggr
16051605 -}
16061606 covarSamp
16071607 :: expr2 (nullity 'PGfloat8)
1608− -> aggr (nullity 'PGfloat8)
1608+ -> aggr ('Null 'PGfloat8)
16091609
16101610 {- | average of the independent variable (sum(X)/N)
16111611 >>> :{
@@ -1618,7 +1618,7 @@ class Aggregate expr1 expr2 aggr
16181618 -}
16191619 regrAvgX
16201620 :: expr2 (nullity 'PGfloat8)
1621− -> aggr (nullity 'PGfloat8)
1621+ -> aggr ('Null 'PGfloat8)
16221622
16231623 {- | average of the dependent variable (sum(Y)/N)
16241624 >>> :{
@@ -1631,7 +1631,7 @@ class Aggregate expr1 expr2 aggr
16311631 -}
16321632 regrAvgY
16331633 :: expr2 (nullity 'PGfloat8)
1634− -> aggr (nullity 'PGfloat8)
1634+ -> aggr ('Null 'PGfloat8)
16351635
16361636 {- | number of input rows in which both expressions are nonnull
16371637 >>> :{
@@ -1644,7 +1644,7 @@ class Aggregate expr1 expr2 aggr
16441644 -}
16451645 regrCount
16461646 :: expr2 (nullity 'PGfloat8)
1647− -> aggr (nullity 'PGint8)
1647+ -> aggr ('Null 'PGint8)
16481648
16491649 {- | y-intercept of the least-squares-fit linear equation determined by the (X, Y) pairs
16501650 >>> :{
@@ -1657,68 +1657,68 @@ class Aggregate expr1 expr2 aggr
16571657 -}
16581658 regrIntercept
16591659 :: expr2 (nullity 'PGfloat8)
1660− -> aggr (nullity 'PGfloat8)
1660+ -> aggr ('Null 'PGfloat8)
16611661
16621662 -- | @regr_r2(Y, X)@, square of the correlation coefficient
16631663 regrR2
16641664 :: expr2 (nullity 'PGfloat8)
1665− -> aggr (nullity 'PGfloat8)
1665+ -> aggr ('Null 'PGfloat8)
16661666
16671667 -- | @regr_slope(Y, X)@, slope of the least-squares-fit linear equation
16681668 -- determined by the (X, Y) pairs
16691669 regrSlope
16701670 :: expr2 (nullity 'PGfloat8)
1671− -> aggr (nullity 'PGfloat8)
1671+ -> aggr ('Null 'PGfloat8)
16721672
16731673 -- | @regr_sxx(Y, X)@, sum(X^2) - sum(X)^2/N
16741674 -- (“sum of squares” of the independent variable)
16751675 regrSxx
16761676 :: expr2 (nullity 'PGfloat8)
1677− -> aggr (nullity 'PGfloat8)
1677+ -> aggr ('Null 'PGfloat8)
16781678
16791679 -- | @regr_sxy(Y, X)@, sum(X*Y) - sum(X) * sum(Y)/N
16801680 -- (“sum of products” of independent times dependent variable)
16811681 regrSxy
16821682 :: expr2 (nullity 'PGfloat8)
1683− -> aggr (nullity 'PGfloat8)
1683+ -> aggr ('Null 'PGfloat8)
16841684
16851685 -- | @regr_syy(Y, X)@, sum(Y^2) - sum(Y)^2/N
16861686 -- (“sum of squares” of the dependent variable)
16871687 regrSyy
16881688 :: expr2 (nullity 'PGfloat8)
1689− -> aggr (nullity 'PGfloat8)
1689+ -> aggr ('Null 'PGfloat8)
16901690
16911691 -- | historical alias for `stddevSamp`
16921692 stddev
16931693 :: expr1 (nullity ty)
1694− -> aggr (nullity (PGAvg ty))
1694+ -> aggr ('Null (PGAvg ty))
16951695
16961696 -- | population standard deviation of the input values
16971697 stddevPop
16981698 :: expr1 (nullity ty)
1699− -> aggr (nullity (PGAvg ty))
1699+ -> aggr ('Null (PGAvg ty))
17001700
17011701 -- | sample standard deviation of the input values
17021702 stddevSamp
17031703 :: expr1 (nullity ty)
1704− -> aggr (nullity (PGAvg ty))
1704+ -> aggr ('Null (PGAvg ty))
17051705
17061706 -- | historical alias for `varSamp`
17071707 variance
17081708 :: expr1 (nullity ty)
1709− -> aggr (nullity (PGAvg ty))
1709+ -> aggr ('Null (PGAvg ty))
17101710
17111711 -- | population variance of the input values
17121712 -- (square of the population standard deviation)
17131713 varPop
17141714 :: expr1 (nullity ty)
1715− -> aggr (nullity (PGAvg ty))
1715+ -> aggr ('Null (PGAvg ty))
17161716
17171717 -- | sample variance of the input values
17181718 -- (square of the sample standard deviation)
17191719 varSamp
17201720 :: expr1 (nullity ty)
1721− -> aggr (nullity (PGAvg ty))
1721+ -> aggr ('Null (PGAvg ty))
17221722
17231723{- |
17241724`Distinction`s are used for the input of `Aggregate` `Expression`s.