It can be pretty trivial with cronjob
0 0 * * * echo "SELECT setval('public.my_table_id_seq', 1, false)" | psql -U my_db_user -d my_db_name
Alternatively, you can set your "sequential" DEFAULT column to invoke a stored procedure that checks the day's rollover, reset the sequence if necessary, and then returns the result of nextval ().
But other than that, no, I would not expect that there will be a magical ALTER SEQUENCE my_seq reset AT INERVAL '1 day' or something like that.
Edit: added duckyfuzz comment.
source share