pgmicro: PostgreSQL dialect in a SQLite file
DatabaseComments
The project documentation mentions a mapping layer for basic types, which mirrors how some early JVM-to-native compilers handled object layouts. It's less about a 1:1 feature match and more about a compatible interface.
debugging the translation layer is still faster than migrating a whole schema.
Suppose the translation layer only handles syntax. Would the advanced type system of PG actually be enforced at the storage level, or would it just be a facade over SQLite's dynamic typing?
With the recent interest in tools like LocustDB for desktop analytics, this feels like a natural progression. It allows developers to keep their complex PG queries while staying within a zero-config local file.
The last time someone tried a dialect bridge via string replacement, it became a regex nightmare. Targeting the VM directly is the only way these projects usually survive the first few months.
The true upside here is the reduction in impedance mismatch. By bypassing the SQL string phase and generating bytecode, you can potentially implement PG's more complex join strategies within the SQLite VM.
What about the indexing... if it's using SQLite bytecode, does it support PG-specific index types like GIN or GiST... or is it limited to B-trees...?
That's fine for a demo, but in a real project, I don't have time to check if a specific index type migrated. Does this actually reduce the deployment headache or just add a new layer of debugging?