Skip site navigation (1) Skip section navigation (2)

Port Bug Report: Error with date_part when checking month

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: Error with date_part when checking month
Date: 1999-02-28 16:38:41
Message-ID: 199902281638.LAA77561@hub.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name		: Monica Kroger
Your email address	: krogerm(at)rocky(dot)edu

Category		: runtime: back-end: SQL
Severity		: non-critical

Summary: Error with date_part when checking month

System Configuration
--------------------
  Operating System   : RedHat 5.2

  PostgreSQL version : 6.3

  Compiler used      : it came precompiled with RH5.2

Hardware:
---------
Linux localhost.localdomain 2.0.36 #7 Fri Feb 26 21:42:39 MST 1999 i586 unknown
P133, 64 Megs of RAM


Versions of other tools:
------------------------


--------------------------------------------------------------------------

Problem Description:
--------------------
When using the date_part function it seems to be off by a day.
It excludes the first of this month and includes the first of next month in the query.


--------------------------------------------------------------------------

Test Case:
----------
Given a table(ice) with a date(eventstart) in it when I use a select as follows:
select * from ice where date_part('month', "eventstart")='6';
it will return all of the dates in June except if they're on 06-01-1999
It will also return all of the dates on July 1.

--------------------------------------------------------------------------

Solution:
---------


--------------------------------------------------------------------------


Responses

pgsql-ports by date

Next:From: The Hermit HackerDate: 1999-02-28 18:45:24
Subject: Re: [PORTS] fmgr cache lookup failed on initdb
Previous:From: Manuel LemosDate: 1999-02-28 16:38:27
Subject: Re: [PORTS] fmgr cache lookup failed on initdb

pgsql-hackers by date

Next:From: Marc G. FournierDate: 1999-02-28 21:34:13
Subject: Testing news2mail gateway ...
Previous:From: dana lapidotDate: 1999-02-28 16:23:32
Subject: hello

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group