mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Add missing newlines to PQescapeInternal() messages pre-v16.
While back-patching 9f45e6a91, I neglected that the convention in
pre-v16 libpq was to include a trailing newline in error message
strings (since then, we add those separately).  Add them now.
Reported-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/a9c837ad-d507-4607-94e4-c5743a8f49e0@eisentraut.org
Backpatch-through: 13-15
			
			
This commit is contained in:
		@@ -4017,10 +4017,10 @@ PQescapeStringInternal(PGconn *conn,
 | 
				
			|||||||
			{
 | 
								{
 | 
				
			||||||
				if (remaining < charlen)
 | 
									if (remaining < charlen)
 | 
				
			||||||
					appendPQExpBufferStr(&conn->errorMessage,
 | 
										appendPQExpBufferStr(&conn->errorMessage,
 | 
				
			||||||
										 libpq_gettext("incomplete multibyte character"));
 | 
															 libpq_gettext("incomplete multibyte character\n"));
 | 
				
			||||||
				else
 | 
									else
 | 
				
			||||||
					appendPQExpBufferStr(&conn->errorMessage,
 | 
										appendPQExpBufferStr(&conn->errorMessage,
 | 
				
			||||||
										 libpq_gettext("invalid multibyte character"));
 | 
															 libpq_gettext("invalid multibyte character\n"));
 | 
				
			||||||
				/* Issue a complaint only once per string */
 | 
									/* Issue a complaint only once per string */
 | 
				
			||||||
				already_complained = true;
 | 
									already_complained = true;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user