]> granicus.if.org Git - postgresql/blobdiff - contrib/pg_upgrade/util.c
pgindent run for 9.4
[postgresql] / contrib / pg_upgrade / util.c
index a7a48d782b5da86ffb641f46f712d80bfb1d7a65..3b94057696d0ad7cae3ead2521af10c39e25c2b1 100644 (file)
@@ -3,12 +3,13 @@
  *
  *     utility functions
  *
- *     Copyright (c) 2010-2013, PostgreSQL Global Development Group
+ *     Copyright (c) 2010-2014, PostgreSQL Global Development Group
  *     contrib/pg_upgrade/util.c
  */
 
 #include "postgres_fe.h"
 
+#include "common/username.h"
 #include "pg_upgrade.h"
 
 #include <signal.h>
@@ -81,7 +82,7 @@ prep_status(const char *fmt,...)
 
 
 static
- __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)))
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)))
 void
 pg_log_v(eLogType type, const char *fmt, va_list ap)
 {
@@ -131,6 +132,8 @@ pg_log_v(eLogType type, const char *fmt, va_list ap)
 
                case PG_FATAL:
                        printf("\n%s", _(message));
+                       printf("Failure, exiting\n");
+                       exit(1);
                        break;
 
                default:
@@ -277,7 +280,7 @@ pg_putenv(const char *var, const char *val)
 
                /*
                 * Do not free envstr because it becomes part of the environment on
-                * some operating systems.      See port/unsetenv.c::unsetenv.
+                * some operating systems.  See port/unsetenv.c::unsetenv.
                 */
 #else
                SetEnvironmentVariableA(var, val);