Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit78b674b

Browse files
committed
Add regression test to catch future breakage of avg(interval). This
aggregate seems uniquely fragile, because it's the only one with anagginitval that's at all likely to change in format.
1 parent1945096 commit78b674b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

‎src/test/regress/expected/interval.out

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,12 @@ SELECT '' AS ten, INTERVAL_TBL.*;
212212
| @ 5 mons 12 hours
213213
(10 rows)
214214

215+
-- test avg(interval), which is somewhat fragile since people have been
216+
-- known to change the allowed input syntax for type interval without
217+
-- updating pg_aggregate.agginitval
218+
select avg(f1) from interval_tbl;
219+
avg
220+
-------------------------------------------------
221+
@ 4 years 1 mon 10 days 4 hours 18 mins 23 secs
222+
(1 row)
223+

‎src/test/regress/sql/interval.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ SELECT '' AS fortyfive, r1.*, r2.*
6060
SET DATESTYLE='postgres';
6161

6262
SELECT''AS ten, INTERVAL_TBL.*;
63+
64+
-- test avg(interval), which is somewhat fragile since people have been
65+
-- known to change the allowed input syntax for type interval without
66+
-- updating pg_aggregate.agginitval
67+
68+
selectavg(f1)from interval_tbl;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp