[Pkg-postgresql-public] Bug#783339: INTERVAL hours miscomputed
Amit Tewari
at at one.com
Sun Apr 26 06:28:18 UTC 2015
Package: postgresql-9.1
Version: 9.1.15-0+deb7u1
Severity: important
File: postgresql
Dear Maintainer,
When "hours" are used in INTERVAL computations, #hours used in computations are double the #hours intended.
sample queries have been included below.
issue_tracker=> SELECT version(); SELECT now();
version
-----------------------------------------------------------------------------------------------
PostgreSQL 9.1.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
(1 row)
now
-------------------------------
2015-04-26 05:56:30.177713+00
(1 row)
issue_tracker=> SELECT issue_guid, time from issue_comments where issue_guid in ('9FS6') and time > current_date - INTERVAL '4 hours' order by 1 desc,2 asc; issue_guid | time
------------+-------------------------------
9FS6 | 2015-04-25 21:29:49.634983+00
9FS6 | 2015-04-26 00:32:15.62193+00
9FS6 | 2015-04-26 01:29:31.390987+00
9FS6 | 2015-04-26 04:53:43.580836+00
9FS6 | 2015-04-26 04:57:07.377853+00
9FS6 | 2015-04-26 05:36:58.890024+00
(6 rows)
issue_tracker=> SELECT issue_guid, time from issue_comments where issue_guid in ('9FS6') and time > current_date - INTERVAL '8 hours' order by 1 desc,2 asc; issue_guid | time
------------+-------------------------------
9FS6 | 2015-04-25 16:16:34.876737+00
9FS6 | 2015-04-25 16:19:11.695349+00
9FS6 | 2015-04-25 16:48:28.876748+00
9FS6 | 2015-04-25 16:49:15.693228+00
9FS6 | 2015-04-25 18:35:26.722351+00
9FS6 | 2015-04-25 21:29:49.634983+00
9FS6 | 2015-04-26 00:32:15.62193+00
9FS6 | 2015-04-26 01:29:31.390987+00
9FS6 | 2015-04-26 04:53:43.580836+00
9FS6 | 2015-04-26 04:57:07.377853+00
9FS6 | 2015-04-26 05:36:58.890024+00
(11 rows)
issue_tracker=>
-- System Information:
Debian Release: 7.8
APT prefers oldstable
APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.10.12-20130925-1206-a58b552 (SMP w/16 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages postgresql-9.1 depends on:
ii libc6 2.13-38+deb7u8
ii libcomerr2 1.42.5-1.1+deb7u1
ii libgssapi-krb5-2 1.10.1+dfsg-5+deb7u3
ii libkrb5-3 1.10.1+dfsg-5+deb7u3
ii libldap-2.4-2 2.4.31-2
ii libpam0g 1.1.3-7.1
ii libpq5 9.1.15-0+deb7u1
ii libssl1.0.0 1.0.1e-2+deb7u16
ii libxml2 2.8.0+dfsg1-7+wheezy4
ii locales 2.13-38+deb7u8
ii postgresql-client-9.1 9.1.15-0+deb7u1
ii postgresql-common 134wheezy4
ii ssl-cert 1.0.32
ii tzdata 2014j-0wheezy1
postgresql-9.1 recommends no packages.
Versions of packages postgresql-9.1 suggests:
pn locales-all <none>
pn oidentd | ident-server <none>
-- no debconf information
More information about the Pkg-postgresql-public
mailing list