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 @@
* Copyright (c) 1994, Regents of the University of California
*
* 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)
}
if (!Quiet)
printf("Amopen: relation %s. attrsize %d\n", relname,
printf("Amopen: relation %s. attrsize %d\n", relname ? relname : "(null)",
(int)ATTRIBUTE_TUPLE_SIZE);
reldesc = heap_openr(relname);
......@@ -530,7 +530,7 @@ closerel(char *name)
if (reldesc) {
if (namestrcmp(RelationGetRelationName(reldesc), name) != 0)
elog(WARN,"closerel: close of '%s' when '%s' was expected",
name, relname);
name, relname ? relname : "(null)");
} else
elog(WARN,"closerel: close of '%s' before any relation was opened",
name);
......@@ -540,7 +540,7 @@ closerel(char *name)
if (reldesc == NULL) {
elog(WARN,"Warning: no opened relation to close.\n");
} else {
if (!Quiet) printf("Amclose: relation %s.\n", relname);
if (!Quiet) printf("Amclose: relation %s.\n", relname ? relname : "(null)");
heap_close(reldesc);
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