Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4826cf

Browse files
committed
Merge the loading of shared object descriptions with regular descriptions,
both in code and in the messages emitted to the user.
1 parentaf00c04 commitc4826cf

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Portions Copyright (c) 1994, Regents of the University of California
4343
* Portions taken from FreeBSD.
4444
*
45-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.113 2006/03/05 15:58:50 momjian Exp $
45+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.114 2006/03/21 17:54:28 alvherre Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -178,7 +178,6 @@ static void unlimit_systables(void);
178178
staticvoidsetup_depend(void);
179179
staticvoidsetup_sysviews(void);
180180
staticvoidsetup_description(void);
181-
staticvoidsetup_shared_description(void);
182181
staticvoidsetup_conversion(void);
183182
staticvoidsetup_privileges(void);
184183
staticvoidset_info_version(void);
@@ -1725,7 +1724,7 @@ setup_description(void)
17251724
{
17261725
PG_CMD_DECL;
17271726

1728-
fputs(_("loadingpg_description ... "),stdout);
1727+
fputs(_("loadingsystem objects' descriptions ... "),stdout);
17291728
fflush(stdout);
17301729

17311730
snprintf(cmd,sizeof(cmd),
@@ -1749,41 +1748,18 @@ setup_description(void)
17491748
" FROM tmp_pg_description t, pg_class c "
17501749
" WHERE c.relname = t.classname;\n");
17511750

1752-
PG_CMD_CLOSE;
1753-
1754-
check_ok();
1755-
}
1756-
1757-
/*
1758-
* load shared description data
1759-
*/
1760-
staticvoid
1761-
setup_shared_description(void)
1762-
{
1763-
PG_CMD_DECL;
1764-
1765-
fputs(_("loading pg_shdescription ... "),stdout);
1766-
fflush(stdout);
1767-
1768-
snprintf(cmd,sizeof(cmd),
1769-
"\"%s\" %s template1 >%s",
1770-
backend_exec,backend_options,
1771-
DEVNULL);
1772-
1773-
PG_CMD_OPEN;
1774-
17751751
PG_CMD_PUTS("CREATE TEMP TABLE tmp_pg_shdescription ( "
1776-
" objoid oid, "
1777-
" classname name, "
1778-
" description text) WITHOUT OIDS;\n");
1752+
" objoid oid, "
1753+
" classname name, "
1754+
" description text) WITHOUT OIDS;\n");
17791755

17801756
PG_CMD_PRINTF1("COPY tmp_pg_shdescription FROM '%s';\n",
1781-
shdesc_file);
1757+
shdesc_file);
17821758

17831759
PG_CMD_PUTS("INSERT INTO pg_shdescription "
1784-
" SELECT t.objoid, c.oid, t.description "
1785-
" FROM tmp_pg_shdescription t, pg_class c "
1786-
" WHERE c.relname = t.classname;\n");
1760+
" SELECT t.objoid, c.oid, t.description "
1761+
" FROM tmp_pg_shdescription t, pg_class c "
1762+
" WHERE c.relname = t.classname;\n");
17871763

17881764
PG_CMD_CLOSE;
17891765

@@ -2960,8 +2936,6 @@ main(int argc, char *argv[])
29602936

29612937
setup_description();
29622938

2963-
setup_shared_description();
2964-
29652939
setup_conversion();
29662940

29672941
setup_privileges();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp