Commit c7c72fa
committed
Use int for hits.width, rather than smallint
I've been getting the occasional "value [..] is out of range for type
smallint" errors. There's very few of these:
=# with x as (
select width, count(width) from size_stats where width >=30000 group by width
)
select * from x order by count desc;
width │ count
───────┼───────
38400 │ 20
34910 │ 7
32002 │ 5
42668 │ 5
48000 │ 3
41280 │ 3
34400 │ 3
31200 │ 2
39386 │ 2
38134 │ 1
34630 │ 1
38048 │ 1
30800 │ 1
42900 │ 1
The widest screen generally available is 7680x2160. 38400 is 7680 x 5,
which probably isn't a coincidence(?)
Anyway, just use an int. Not worth the 2 bytes it saves, and size_stats
already uses int.1 parent 64b3141 commit c7c72fa
File tree
2 files changed
+28
-0
lines changed- db/migrate
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments