postgres=# SELECT extract(DOW FROM now()); date_part ----------- 1
使用DOW(day of week),可以获取是星期几
使用DAY,可以获取当天是当月的第几天