WITH RECURSIVE date_table AS (
-- Base case: Start with the initial date
SELECT '2005-07-01'::DATE AS date
UNION ALL
-- Recursive case: Add one day to the previous date
SELECT date + INTERVAL '1 day'
FROM date_table
WHERE date < '2005-07-31' -- Stop when the date reaches the end date
)
SELECT date
FROM date_table;