Neil Conway wrote: > On Sun, 2006-03-19 at 23:11 -0400, Alvaro Herrera wrote: > > Here's a little cosmetic patch merging the loading of regular > > descriptions with shared descriptions (just like the process of loading > > regular dependencies was merged with shared dependencies). > > Where's the patch?
Here: -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
Index: initdb.c =================================================================== RCS file: /home/alvherre/cvs/pgsql/src/bin/initdb/initdb.c,v retrieving revision 1.113 diff -c -r1.113 initdb.c *** initdb.c 5 Mar 2006 15:58:50 -0000 1.113 --- initdb.c 20 Mar 2006 02:58:59 -0000 *************** *** 178,184 **** static void setup_depend(void); static void setup_sysviews(void); static void setup_description(void); - static void setup_shared_description(void); static void setup_conversion(void); static void setup_privileges(void); static void set_info_version(void); --- 178,183 ---- *************** *** 1725,1731 **** { PG_CMD_DECL; ! fputs(_("loading pg_description ... "), stdout); fflush(stdout); snprintf(cmd, sizeof(cmd), --- 1724,1730 ---- { PG_CMD_DECL; ! fputs(_("loading system objects' descriptions ... "), stdout); fflush(stdout); snprintf(cmd, sizeof(cmd), *************** *** 1749,1789 **** " FROM tmp_pg_description t, pg_class c " " WHERE c.relname = t.classname;\n"); - PG_CMD_CLOSE; - - check_ok(); - } - - /* - * load shared description data - */ - static void - setup_shared_description(void) - { - PG_CMD_DECL; - - fputs(_("loading pg_shdescription ... "), stdout); - fflush(stdout); - - snprintf(cmd, sizeof(cmd), - "\"%s\" %s template1 >%s", - backend_exec, backend_options, - DEVNULL); - - PG_CMD_OPEN; - PG_CMD_PUTS("CREATE TEMP TABLE tmp_pg_shdescription ( " ! " objoid oid, " ! " classname name, " ! " description text) WITHOUT OIDS;\n"); PG_CMD_PRINTF1("COPY tmp_pg_shdescription FROM '%s';\n", ! shdesc_file); PG_CMD_PUTS("INSERT INTO pg_shdescription " ! " SELECT t.objoid, c.oid, t.description " ! " FROM tmp_pg_shdescription t, pg_class c " ! " WHERE c.relname = t.classname;\n"); PG_CMD_CLOSE; --- 1748,1765 ---- " FROM tmp_pg_description t, pg_class c " " WHERE c.relname = t.classname;\n"); PG_CMD_PUTS("CREATE TEMP TABLE tmp_pg_shdescription ( " ! " objoid oid, " ! " classname name, " ! " description text) WITHOUT OIDS;\n"); PG_CMD_PRINTF1("COPY tmp_pg_shdescription FROM '%s';\n", ! shdesc_file); PG_CMD_PUTS("INSERT INTO pg_shdescription " ! " SELECT t.objoid, c.oid, t.description " ! " FROM tmp_pg_shdescription t, pg_class c " ! " WHERE c.relname = t.classname;\n"); PG_CMD_CLOSE; *************** *** 2960,2967 **** setup_description(); - setup_shared_description(); - setup_conversion(); setup_privileges(); --- 2936,2941 ----
---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster