diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
new file mode 100644
index c1e7cfe..13123d6
*** a/src/bin/psql/copy.c
--- b/src/bin/psql/copy.c
*************** parse_slash_copy(const char *args)
*** 196,202 ****
  		goto error;
  
  	/* { 'filename' | PROGRAM 'command' | STDIN | STDOUT | PSTDIN | PSTDOUT } */
! 	token = strtokx(NULL, whitespace, NULL, "'",
  					0, false, false, pset.encoding);
  	if (!token)
  		goto error;
--- 196,202 ----
  		goto error;
  
  	/* { 'filename' | PROGRAM 'command' | STDIN | STDOUT | PSTDIN | PSTDOUT } */
! 	token = strtokx(NULL, whitespace, ";", "'",
  					0, false, false, pset.encoding);
  	if (!token)
  		goto error;
*************** parse_slash_copy(const char *args)
*** 205,211 ****
  	{
  		int			toklen;
  
! 		token = strtokx(NULL, whitespace, NULL, "'",
  						0, false, false, pset.encoding);
  		if (!token)
  			goto error;
--- 205,211 ----
  	{
  		int			toklen;
  
! 		token = strtokx(NULL, whitespace, ";", "'",
  						0, false, false, pset.encoding);
  		if (!token)
  			goto error;
