postgres current date code example
Example 1: postgresql date = today
Select * from table where col_date::date = now()::date;
Example 2: postgres get timestamp
SELECT CURRENT_TIMESTAMP;
Example 3: postgresql today - 1 year
select now() - INTERVAL '1 YEAR';
Example 4: postgre query date
SELECT * FROM data WHERE date = '2020-12-21'