Add version and data directory to initdb output

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Add version and data directory to initdb output
Дата
Msg-id CAKFQuwZjj0JXUSRed-nxNY1CRHkmcnkJ=J0zKhXM_pJ_P6sAGw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add version and data directory to initdb output  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
Hackers,

initdb is already pretty chatty, and the version of the cluster being installed seems useful to include as well.  The data directory is probably less so - though I am thinking that the absolute path would be useful to report, especially when a relative path is specified (I didn't figure that part out yet, figured I'd get the idea approved before working out how to make it happen).

Moving "Success" to that "summary output" line and leaving the optional shell command line just be the shell command made sense to me.

diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index ab826da650..54a1d1fcac 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -3119,6 +3119,9 @@ main(int argc, char *argv[])
  "--auth-local and --auth-host, the next time you run initdb.");
  }
 
+ printf(_("\nSuccess. PostgreSQL version %s cluster has been initialized at %s.\n"), PG_VERSION, pg_data);
+ fflush(stdout);
+
  if (!noinstructions)
  {
  /*
@@ -3147,7 +3150,7 @@ main(int argc, char *argv[])
  /* translator: This is a placeholder in a shell command. */
  appendPQExpBuffer(start_db_cmd, " -l %s start", _("logfile"));
 
- printf(_("\nSuccess. You can now start the database server using:\n\n"
+ printf(_("\nYou can now start the database server using:\n\n"
  "    %s\n\n"),
    start_db_cmd->data);
 

David J.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Crash in new pgstats code
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Add TAP test to automate the equivalent of check_guc