I'm creating a custom extension for PostgreSQL. I can get the extension to create successfully, but my foo--0.1.sql is getting rather large and complex. I'd like to break it out into multiple files for ease of maintenance but I can't figure out from the docs how to do this.
It seems like I could go one of two routes:
- Use a built-in functionality with PG's extension building infrastructure to automatically use all of my .sql files.
- Use the Makefile to concatenate all of my .sql files when the extension is first built.
My questions are whether #1 is even possible (I can't see anything in the docs - it only references the single extension--version.sql file that is required).
Also, how would I do #2? I don't have much experience with Makefiles and can't quite figure it out.