Explorar o código

add --set=\"ON_ERROR_STOP=1\" to psql execution

  Thanks to Joost Helberg for suggesting this change.

* lisp/ob-sql.el (org-babel-execute:sql): Add
  --set=\"ON_ERROR_STOP=1\" to psql execution.
Eric Schulte %!s(int64=12) %!d(string=hai) anos
pai
achega
baa44f6542
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/ob-sql.el

+ 1 - 1
lisp/ob-sql.el

@@ -123,7 +123,7 @@ This function is called by `org-babel-execute-src-block'."
 				    (org-babel-process-file-name in-file)
 				    (org-babel-process-file-name out-file)))
 		    ('postgresql (format
-				  "psql -A -P footer=off -F \"\t\"  -f %s -o %s %s"
+				  "psql --set=\"ON_ERROR_STOP=1\" -A -P footer=off -F \"\t\"  -f %s -o %s %s"
 				  (org-babel-process-file-name in-file)
 				  (org-babel-process-file-name out-file)
 				  (or cmdline "")))