src/bin/pg_dump/dumputils.c
static char *
dequoteAclUserName(PQExpBuffer output, char *input)
{
	resetPQExpBuffer(output);

	while (*input && *input != '=')
	{
		/*
		 * If user name isn't quoted, then just add it to the output buffer
		 */
		if (*input != '"')
			appendPQExpBufferChar(output, *input++);
		else
		{
			/* Otherwise, it's a quoted username */
			input++;
			/* Loop until we come across an unescaped quote */
			while (!(*input == '"' && *(input + 1) != '"'))
			{
				if (*input == '\0')
					return input;	/* really a syntax error... */

				/*
				 * Quoting convention is to escape " as "".  Keep this code in
				 * sync with putid() in backend's acl.c.
				 */
				if (*input == '"' && *(input + 1) == '"')
					input++;
				appendPQExpBufferChar(output, *input++);
			}
			input++;
		}
	}
	return input;
}
/*
 * Transfer a user or group name starting at *input into the output buffer,
 * dequoting if needed.  Returns a pointer to just past the input name.
 * The name is taken to end at an unquoted '=' or end of string.
 * Note: unlike quoteAclUserName(), this first clears the output buffer.
 */
Transfer a user or group name starting at *input into the output buffer,
dequoting if needed.  Returns a pointer to just past the input name.
The name is taken to end at an unquoted '=' or end of string.
Note: unlike quoteAclUserName(), this first clears the output buffer.
Transfer a user or group name starting at * input into the output buffer dequoting if needed . Returns a pointer to just past the input name . The name is taken to end at an unquoted ' = ' or end of string . Note : unlike quoteAclUserName () this first clears the output buffer .
static char *
dequoteAclUserName(PQExpBuffer output, char *input)
{
	resetPQExpBuffer(output);
	while (*input && *input != '=')
	{
		if (*input != '"')
			appendPQExpBufferChar(output, *input++);
		else
		{
			input++;
			while (!(*input == '"' && *(input + 1) != '"'))
			{
				if (*input == '\0')
					return input;	
				if (*input == '"' && *(input + 1) == '"')
					input++;
				appendPQExpBufferChar(output, *input++);
			}
			input++;
		}
	}
	return input;
}
static char * dequoteAclUserName ( PQExpBuffer output , char * input ) { resetPQExpBuffer ( output ) ; while ( * input && * input != ' ' ) { if ( * input != ' ' ) appendPQExpBufferChar ( output , * input ++ ) ; else { input ++ ; while ( ! ( * input == ' ' && * ( input + 1 ) != ' ' ) ) { if ( * input == ' \0 ' ) return input ; if ( * input == ' ' && * ( input + 1 ) == ' ' ) input ++ ; appendPQExpBufferChar ( output , * input ++ ) ; } input ++ ; } } return input ; }
Transfer a user or group name starting at *input into the output buffer,
 dequoting if needed.
Transfer a user or group name starting at * input into the output buffer dequoting if needed .
/*
		 * If user name isn't quoted, then just add it to the output buffer
		 */ /* Otherwise, it's a quoted username */ /* Loop until we come across an unescaped quote */ /* really a syntax error... */ /*
				 * Quoting convention is to escape " as "".  Keep this code in
				 * sync with putid() in backend's acl.c.
				 */