mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.4 1997/08/03 02:35:13 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.5 1997/08/12 20:15:27 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@ -349,15 +349,13 @@ print_plan_recursive (Plan* p, Query *parsetree, int indentLevel, char* label)
|
||||
if (IsA(p,Scan) || IsA(p,SeqScan)) {
|
||||
RangeTblEntry *rte;
|
||||
rte = rt_fetch(((Scan*)p)->scanrelid, parsetree->rtable);
|
||||
strncpy(extraInfo, rte->relname, NAMEDATALEN);
|
||||
extraInfo[NAMEDATALEN-1] = '\0';
|
||||
strNcpy(extraInfo, rte->relname, NAMEDATALEN-1);
|
||||
} else
|
||||
if (IsA(p,IndexScan)) {
|
||||
strncpy(extraInfo,
|
||||
strNcpy(extraInfo,
|
||||
((RangeTblEntry*)(nth(((IndexScan*)p)->scan.scanrelid - 1,
|
||||
parsetree->rtable)))->relname,
|
||||
NAMEDATALEN);
|
||||
extraInfo[NAMEDATALEN-1] = '\0';
|
||||
NAMEDATALEN-1);
|
||||
} else
|
||||
extraInfo[0] = '\0';
|
||||
if (extraInfo[0] != '\0')
|
||||
|
Reference in New Issue
Block a user