I am using PostgreSQL 8.3. I have a table like this:
id regist_time result
-----------------------------------
1 2012-07-0
This can help, a query to get all days of current week.
select cast(date_trunc('week', current_date) as date) + i
from generate_series(0,6) i
2015-08-17
2015-08-18
2015-08-19
2015-08-20
2015-08-21
To get week start and end date (as 0 for Monday and 4 for Friday):
select cast(date_trunc('week', current_date) as date) + 0 || '-->' || cast(date_trunc('week', current_date) as date) + 4;
2015-08-17-->2015-08-21