On Sat, Jan 10, 2015 at 02:53:13PM -0500, Tom Lane wrote:
> While looking at fe-auth.c I noticed quite a few places that weren't
> bothering to make error messages localizable (ie, missing libpq_gettext
> calls), and/or were failing to add a trailing newline as expected in
> libpq error messages.  Perhaps these are intentional but I doubt it.
> Most of the instances seemed to be SSPI-related.
> 
> I have no intention of fixing these myself, but whoever committed that
> code should take a second look.

I looked through that file and only found two cases;  patch attached.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c
new file mode 100644
index 8927df4..c267f72
*** a/src/interfaces/libpq/fe-auth.c
--- b/src/interfaces/libpq/fe-auth.c
*************** pg_SSPI_continue(PGconn *conn)
*** 333,339 ****
  			 * authentication. Keep check in case it shows up with other
  			 * authentication methods later.
  			 */
! 			printfPQExpBuffer(&conn->errorMessage, "SSPI returned invalid number of output buffers\n");
  			return STATUS_ERROR;
  		}
  
--- 333,339 ----
  			 * authentication. Keep check in case it shows up with other
  			 * authentication methods later.
  			 */
! 			printfPQExpBuffer(&conn->errorMessage, libpq_gettext("SSPI returned invalid number of output buffers\n"));
  			return STATUS_ERROR;
  		}
  
*************** pg_fe_sendauth(AuthRequest areq, PGconn
*** 691,697 ****
  			if (pg_password_sendauth(conn, conn->pgpass, areq) != STATUS_OK)
  			{
  				printfPQExpBuffer(&conn->errorMessage,
! 					 "fe_sendauth: error sending password authentication\n");
  				return STATUS_ERROR;
  			}
  			break;
--- 691,697 ----
  			if (pg_password_sendauth(conn, conn->pgpass, areq) != STATUS_OK)
  			{
  				printfPQExpBuffer(&conn->errorMessage,
! 					 libpq_gettext("fe_sendauth: error sending password authentication\n"));
  				return STATUS_ERROR;
  			}
  			break;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to