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.
This commit is contained in:
Tom Lane 2001-05-18 16:02:01 +00:00
parent 1945096324
commit 78b674ba35
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -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;