|
Home > Archive > PostgreSQL Discussion > September 2005 > date_trunc('week', '2005-01-01'::TIMESTAMP)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
date_trunc('week', '2005-01-01'::TIMESTAMP)
|
|
| pgsql-general@list.coretech.ro 2005-09-22, 7:23 am |
|
select date_trunc('week', '2005-01-01'::TIMESTAMP) returns '2006-01-02
00:00:00'
is this the intended result or is some kind of a bug ?
the result should not be '2004-12-27 00:00:00' ?
thanks,
Razvan Radu
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
| |
| A. Kretschmer 2005-09-22, 7:23 am |
| am 22.09.2005, um 12:40:00 +0300 mailte pgsql-general@list.coretech.ro folgendes:
>
> select date_trunc('week', '2005-01-01'::TIMESTAMP) returns '2006-01-02
> 00:00:00'
Which version?
test=# select date_trunc('week', '2005-01-01'::TIMESTAMP);
date_trunc
---------------------
2004-12-27 00:00:00
(1 row)
test=# select version();
version
-------------------------------------------------------------------------------------------
PostgreSQL 8.0.3 on i386-pc-linux-gnu, compiled by GCC cc (GCC) 3.3.5 (Debian 1:3.3.5-13)
(1 row)
The result is IMHO correct.
Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Michael Fuhr 2005-09-22, 9:23 am |
| On Thu, Sep 22, 2005 at 12:20:58PM +0200, A. Kretschmer wrote:
> am 22.09.2005, um 12:40:00 +0300 mailte pgsql-general@list.coretech.ro folgendes:
>
> Which version?
This bug was fixed in 8.0.2:
http://archives.postgresql.org/pgsq...04/msg00008.php
A similar bug is fixed in CVS, so it'll be in 8.0.4:
http://archives.postgresql.org/pgsq...07/msg00144.php
--
Michael Fuhr
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
|
|
|
|
|