Postgres permits distribution and management with CREATE EXTENSION. Is it more proper to write internal EXTENSIONS to manage third-party provided data, or to use scripts that DROP
and CREATE SCHEMA
? What are the pro's and con's to both?
Right now I tend to write,
./mySchema.psql
./mySchema/01_schema.sql
./mySchema/02_datatypes.sql
./mySchema/10_tables.sql
Etc.
And, I install all of that into SCHEMA mySchema
. I'm wondering if I should change my flow and upgrade to use CREATE EXTENSION
.