SQLite vs Postgres for a local database (on disk, not over the network): who wins? (Each in their most performance oriented configuration)

Functionality-wise, SQLite's dialect is really lacking...

Is it the SQL dialect there lacking or is it the built-in functions?

I agree that SQLite default functionality is very thin compared to PostgreSQL - especially with respect to things like date manipulation - but you can extend it with more SQL functions (and table-valued functions) very easily.

Depends on what easily means.

Sqlite can't do custom format date parsing and regex extract. How do we extend something like this?

If we go beyond a simple function to window function, I imagine it would be even harder.

At this point, we nlmight as well use postgres.

Adding user-defined functions to SQLite is not difficult, and the mechanism is quite flexible. You can create extensions and load them when you create the SQLite connection to have the functions available in queries. I wrote a blog post explaining how to do that using Rust, and the example is precisely a `regex_extract` function [0].

If you need them, you also have a "stdlib" implemented for Go [1] and a pretty extensive collection of extensions [2]

[0]: https://ricardoanderegg.com/posts/extending-sqlite-with-rust...

[1]: https://github.com/multiprocessio/go-sqlite3-stdlib

[2]: https://github.com/nalgeon/sqlean