I have tried several topics like this one: How to find missing data rows using SQL? here, but I couldn\'t make it work in my situation.
I have a table named po
The simplest way to find missing dates is to use a calendar table. I've posted code to create and populate a calendar table for PostgreSQL; you should be able to adapt it without any trouble.
With the calendar table in place, your query is pretty simple, and easy to understand. To find the missing dates for October, 2011, you'd use something along these lines. (Guessing at your "posts" table.)
select c.cal_date
from calendar c
left join posts p on (c.cal_date = p.date)
where p.date is null
and c.cal_date between '2011-10-01' and '2011-10-31'
and p.userid = 1
order by c.cal_date