mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +03:00
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:
parent
1945096324
commit
78b674ba35
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user