Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2026-10-06 6bac54b555d27f1a85c1e4f011a6e7bd9111b0d0
src/bin/initdb/initdb.c
@@ -186,6 +186,7 @@
static char *system_constraints_file;
static char *system_functions_file;
static char *system_views_file;
static char *rudb_init_file;
static bool success = false;
static bool made_new_pgdata = false;
static bool found_existing_pgdata = false;
@@ -1436,7 +1437,7 @@
      conflines = replace_guc_value(conflines, gnames->str,
                             gvalues->str, false);
   }
   /* Append auto-configured recommended parameters */
   if (autoconfig)
      conflines = initdb_autoconfig_update(conflines);
@@ -1740,7 +1741,11 @@
   for (char **line = lines; *line != NULL; line++)
   {
      PG_CMD_PUTS(*line);
      /* Ignore empty lines. They upset backend for some reason */
      if (strcmp(*line, "\n") != 0)
      {
         PG_CMD_PUTS(*line);
      }
      free(*line);
   }
@@ -2808,6 +2813,7 @@
   set_input(&system_constraints_file, "system_constraints.sql");
   set_input(&system_functions_file, "system_functions.sql");
   set_input(&system_views_file, "system_views.sql");
   set_input(&rudb_init_file, "init.sql");
   if (show_setting || debug)
   {
@@ -2836,6 +2842,7 @@
   check_input(system_constraints_file);
   check_input(system_functions_file);
   check_input(system_views_file);
   check_input(rudb_init_file);
}
@@ -3148,6 +3155,8 @@
   load_plpgsql(cmdfd);
   setup_run_file(cmdfd, rudb_init_file);
   vacuum_db(cmdfd);
   make_template0(cmdfd);