src/bin/pg_dump/pg_dump.c
static char *
convertRegProcReference(const char *proc)
{
	char	   *name;
	char	   *paren;
	bool		inquote;

	/* In all cases "-" means a null reference */
	if (strcmp(proc, "-") == 0)
		return NULL;

	name = pg_strdup(proc);
	/* find non-double-quoted left paren */
	inquote = false;
	for (paren = name; *paren; paren++)
	{
		if (*paren == '(' && !inquote)
		{
			*paren = '\0';
			break;
		}
		if (*paren == '"')
			inquote = !inquote;
	}
	return name;
}
/*
 * Convert a function reference obtained from pg_operator
 *
 * Returns allocated string of what to print, or NULL if function references
 * is InvalidOid. Returned string is expected to be free'd by the caller.
 *
 * The input is a REGPROCEDURE display; we have to strip the argument-types
 * part.
 */
Convert a function reference obtained from pg_operator
Returns allocated string of what to print, or NULL if function references
is InvalidOid. Returned string is expected to be free'd by the caller.

The input is a REGPROCEDURE display; we have to strip the argument-types
part.
Convert a function reference obtained from pg_operator Returns allocated string of what to print or NULL if function references is InvalidOid . Returned string is expected to be free ' d by the caller . The input is a REGPROCEDURE display ; we have to strip the argument - types part .
static char *
convertRegProcReference(const char *proc)
{
	char	   *name;
	char	   *paren;
	bool		inquote;
	if (strcmp(proc, "-") == 0)
		return NULL;
	name = pg_strdup(proc);
	inquote = false;
	for (paren = name; *paren; paren++)
	{
		if (*paren == '(' && !inquote)
		{
			*paren = '\0';
			break;
		}
		if (*paren == '"')
			inquote = !inquote;
	}
	return name;
}
static char * convertRegProcReference ( const char * proc ) { char * name ; char * paren ; bool inquote ; if ( strcmp ( proc , " " ) == 0 ) return NULL ; name = pg_strdup ( proc ) ; inquote = false ; for ( paren = name ; * paren ; paren ++ ) { if ( * paren == ' ' && ! inquote ) { * paren = ' \0 ' ; break ; } if ( * paren == ' ' ) inquote = ! inquote ; } return name ; }
Convert a function reference obtained from pg_operator
 Returns allocated string of what to print, or NULL if function references
 is InvalidOid.
Convert a function reference obtained from pg_operator Returns allocated string of what to print or NULL if function references is InvalidOid .
/* In all cases "-" means a null reference */ /* find non-double-quoted left paren */