Commit 78b674ba authored by Tom Lane's avatar Tom Lane

Add regression test to catch future breakage of avg(interval). This

aggregate seems uniquely fragile, because it's the only one with an
agginitval that's at all likely to change in format.
parent 19450963
......@@ -212,3 +212,12 @@ SELECT '' AS ten, INTERVAL_TBL.*;
| @ 5 mons 12 hours
(10 rows)
-- test avg(interval), which is somewhat fragile since people have been
-- known to change the allowed input syntax for type interval without
-- updating pg_aggregate.agginitval
select avg(f1) from interval_tbl;
avg
-------------------------------------------------
@ 4 years 1 mon 10 days 4 hours 18 mins 23 secs
(1 row)
......@@ -60,3 +60,9 @@ SELECT '' AS fortyfive, r1.*, r2.*
SET DATESTYLE = 'postgres';
SELECT '' AS ten, INTERVAL_TBL.*;
-- test avg(interval), which is somewhat fragile since people have been
-- known to change the allowed input syntax for type interval without
-- updating pg_aggregate.agginitval
select avg(f1) from interval_tbl;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment