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

Re: BUG #4317: problem with comparision of datatype date

From: Sanjay Rajdev <sanjay(dot)rajdev(at)featherstoneinformatics(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4317: problem with comparision of datatype date
Date: 2008-07-18 19:35:20
Message-ID: 4744486.108381216409720544.JavaMail.root@mail.featherstoneinformatics.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom, 

Thanks for the thought, I think that this can be the problem, as earlier there was no indexing on the column, but 2 days back we added index on 5 of columns in the table and "somedate" is one of them. This problem have been noticed after the index's were added. 
I can't test this out as this happens while people are using the software, and when someone complains, we have to fix it immediately we can't have people wait for the re-indexing to be done. 

For fixing it we just update the date to some other date and then update it back to what was originally, this way it works. Any suggestion to get it fixed. 



Regards, 
Sanjay Rajdev 


----- Original Message ----- 
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> 
To: "Sanjay Rajdev" <sanjay(dot)rajdev(at)featherstoneinformatics(dot)com> 
Cc: pgsql-bugs(at)postgresql(dot)org 
Sent: Friday, July 18, 2008 10:17:03 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi 
Subject: Re: [BUGS] BUG #4317: problem with comparision of datatype date 

"Sanjay Rajdev" <sanjay(dot)rajdev(at)featherstoneinformatics(dot)com> writes: 
> Here is what is happening, I have a datatype "date" column in my database 
> called "somedate" there are 277 rows in the database which have "somedate" = 
> "2008-07-18". 

> When I execute the below query 
> "select * from myTable where somedate = '2008-07-18'" 
> I only get 145 rows back from the database. 

Is there an index on somedate, and if so does reindexing it help? 

regards, tom lane 

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2008-07-18 19:51:35
Subject: Re: BUG #4317: problem with comparision of datatypedate
Previous:From: Kevin GrittnerDate: 2008-07-18 19:09:29
Subject: memory leak in 8.2.4

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