mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
fix for initdb --debug core dump, from Tatsuo Ishii
This commit is contained in:
parent
c666255112
commit
c2010d8e4d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user