xataio / pgzx

Create PostgreSQL extensions using Zig.
https://xata.io
Apache License 2.0
446 stars 12 forks source link

Build: Support to assemble SQL files #55

Open urso opened 5 months ago

urso commented 5 months ago

For some projects the accompanying SQL file can become quite large. I'd love to have support to split the SQL file for development purposes and combine them at build time.

Due to SQL files being statements being executed one after another users must be able to correctly configure the order of those files.

urso commented 5 months ago

I'm thinking to use the C preprocessor. The zig toolchain already provides a C compiler which we could use without introducing any new dependencies. (The preprocessor can be run via zig cc -E <file>).