diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-05-18 16:02:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-05-18 16:02:01 +0000 |
commit | 78b674ba35d35836b7ff6eac9e22d92ab5e3f2bd (patch) | |
tree | 6fabdce4a9109f52fcdfa23afc5e3db7e8a35c73 | |
parent | 1945096324d16489c71e04139c4b4191b93f2f1f (diff) | |
download | postgresql-78b674ba35d35836b7ff6eac9e22d92ab5e3f2bd.tar.gz postgresql-78b674ba35d35836b7ff6eac9e22d92ab5e3f2bd.zip |
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.
-rw-r--r-- | src/test/regress/expected/interval.out | 9 | ||||
-rw-r--r-- | src/test/regress/sql/interval.sql | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/test/regress/expected/interval.out b/src/test/regress/expected/interval.out index 8a4eb275906..ed16ada224f 100644 --- a/src/test/regress/expected/interval.out +++ b/src/test/regress/expected/interval.out @@ -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) + diff --git a/src/test/regress/sql/interval.sql b/src/test/regress/sql/interval.sql index 945eb08d605..aa14cd3b094 100644 --- a/src/test/regress/sql/interval.sql +++ b/src/test/regress/sql/interval.sql @@ -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; |