Commit c2010d8e authored by Bruce Momjian's avatar Bruce Momjian

fix for initdb --debug core dump, from Tatsuo Ishii

parent c6662551
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.17 1997/03/14 23:18:32 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.18 1997/06/25 21:12:19 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -484,7 +484,7 @@ boot_openrel(char *relname) ...@@ -484,7 +484,7 @@ boot_openrel(char *relname)
} }
if (!Quiet) if (!Quiet)
printf("Amopen: relation %s. attrsize %d\n", relname, printf("Amopen: relation %s. attrsize %d\n", relname ? relname : "(null)",
(int)ATTRIBUTE_TUPLE_SIZE); (int)ATTRIBUTE_TUPLE_SIZE);
reldesc = heap_openr(relname); reldesc = heap_openr(relname);
...@@ -530,7 +530,7 @@ closerel(char *name) ...@@ -530,7 +530,7 @@ closerel(char *name)
if (reldesc) { if (reldesc) {
if (namestrcmp(RelationGetRelationName(reldesc), name) != 0) if (namestrcmp(RelationGetRelationName(reldesc), name) != 0)
elog(WARN,"closerel: close of '%s' when '%s' was expected", elog(WARN,"closerel: close of '%s' when '%s' was expected",
name, relname); name, relname ? relname : "(null)");
} else } else
elog(WARN,"closerel: close of '%s' before any relation was opened", elog(WARN,"closerel: close of '%s' before any relation was opened",
name); name);
...@@ -540,7 +540,7 @@ closerel(char *name) ...@@ -540,7 +540,7 @@ closerel(char *name)
if (reldesc == NULL) { if (reldesc == NULL) {
elog(WARN,"Warning: no opened relation to close.\n"); elog(WARN,"Warning: no opened relation to close.\n");
} else { } else {
if (!Quiet) printf("Amclose: relation %s.\n", relname); if (!Quiet) printf("Amclose: relation %s.\n", relname ? relname : "(null)");
heap_close(reldesc); heap_close(reldesc);
reldesc = (Relation)NULL; reldesc = (Relation)NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment