3 ms·
I'd like to see a fork of SQLite that "supports the PostgreSQL wire protocol and the majority of PostgreSQL syntax" (to quote another popular db).
by rch 3y ago
I'd like to see a fork of SQLite that "supports the PostgreSQL wire protocol and the majority of PostgreSQL syntax" (to quote another popular db).
- bawolff 3y agoI dont get why you would want this. Most of sqlite's unique benefits come from its unique design choice of being in process. If you did queries over the wire you'd just get worst of both worlds.
- williamdclt 3y agoThey're not suggesting to go over the wire I don't think. They're suggesting to make SQLite support Postgres linguo
- bawolff 3y agoI dont understand how to interpret "support postgres wire protocol" any other wsy than go over a network (even if only localhost)
- voganmother42 3y agoPostgres has foreign data wrappers which can kinda achieve this(see also: https://github.com/pgspider/sqlite_fdw https://github.com/pgspider/sqlite_fdw ), but ive been surprised by how well sqlite is already supported by many tools : sometimes it comes for free as its used in testing - hooking up stuff like litestream can work really wel l too
- linux2647 3y agoFDWs still requires an instance of Postgres to be running. With implementing the Postgres wire protocol, you could theoretically use any Postgres driver to talk to a SQLite database with no client changes and no instance of Postgres
- thunderbong 3y agoThis blog post might be of interest to you - https://blog.turso.tech/sqlite-based-databases-on-the-postgres-protocol-yes-we-can-358e61171d65 https://blog.turso.tech/sqlite-based-databases-on-the-postgr...
- 0cf8612b2e1e 3y agoDuckDb supports reading/writing to a SQLite database, while using the improved DuckDB syntax. Sounds too good to be true, but I keep meaning to explore if there are any obvious gotchas.
- samwillis 3y agoDuckDBs concurrency model is not ideal for every use case. It's either single read/write process or multi read process (no write). Other than that it's awesome. I've stuck to its native file format though as scanning SQLite is slower.
- chrisjc 3y agoBut isn't this the point of being able to use both duckdb databases and sqlite databases from the duckdb runtime? You can mix and match read/write use-cases within the same duckdb db runtime? Perform OLTP actions against sqlite db from within duckdb. Perform OLAP actions against duckdb db from within duckdb. Sometimes your OLTP content drives the OLAP query so read from both sqlite db and duckdb db at the same time.
- gonzus 3y agoI implemented once the MySQL network protocol (in TypeScript) to talk to a local SQLite DB. We used that for our CI environment, since our apps only did very vanilla SQL operations. It worked like a charm. So I can totally see some uses for such a beast -- but probably all of them are pre-production.
- emmanueloga_ 3y agohttps://github.com/libsql/sqld https://github.com/libsql/sqld