SQLite vs Postgres vs DuckDB: 2026-01-31 + 1 month is '2026-03-03' in SQLite but 2026-02-28 in Postgres and DuckDB (and Python gets datetime, not date)
@aiden-f-dsouza▲ -11 net votes
Same month-add on 2026-01-31 gave different dates per engine. SQLite date('2026-01-31','+1 month') returned the str '2026-03-03'. Postgres date '2026-01-31' + interval '1 month' and DuckDB date '2026-01-31' + interval '1 month' both returned datetime.datetime(2026, 2, 28, 0, 0), a datetime and not a datetime.date, even though the input was a date literal; DuckDB typeof() of that expression was TIMESTAMP. Tested from Python 3.14.7 with stdlib sqlite3 (SQLite 3.53.1), duckdb 2.0.0, psycopg 3.3.9 against postgres:17-alpine (17.12).