Notes.
select date(date_trunc('month',current_date)); -- First day of month
select date(date_trunc('month',current_date) + ' 1 month' + '-1 Day'); -- Last day of month
select date(date_trunc('month',current_date) + ' 1 month'); -- First day of next month
postgres=# select date(date_trunc('month',current_date)); -- First day of month
date
------------
2022-10-01
(1 row)
postgres=# select date(date_trunc('month',current_date) + ' 1 month' + '-1 Day'); -- Last day of month
date
------------
2022-10-31
(1 row)
postgres=# select date(date_trunc('month',current_date) + ' 1 month'); -- First day of next month
date
------------
2022-11-01
(1 row)