juspay / services-flake

NixOS-like services for Nix flakes
https://community.flake.parts/services-flake
MIT License
327 stars 28 forks source link

fix(postgres): stop init on error in `sql` scripts #209

Closed shivaraj-bh closed 2 months ago

shivaraj-bh commented 2 months ago

resolves #207

From psql docs (https://www.postgresql.org/docs/current/app-psql.html):

psql returns 0 to the shell if it finished normally, 1 if a fatal error of its own occurs (e.g., out of memory, file not found), 2 if the connection to the server went bad and the session was not interactive, and 3 if an error occurred in a script and the variable ON_ERROR_STOP was set.

Also resolves https://github.com/juspay/services-flake/issues/107