3 ms·
I think most people who use postgres in their personal projects have a snippet like one that they copy from project to project, I know I do. Curious to see othe
by gen220 4y ago
I think most people who use postgres in their personal projects have a snippet like one that they copy from project to project, I know I do. Curious to see others' scripts!
Mine logs in as `postgres`, creates the database and extensions I normally use, then creates a user and grants the appropriate privileges to that application user for the relevant db/schemas. Incidentally, it's the same script I use for "prod" deployments on my homelab.