Index: src/backend/utils/adt/cash.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v
retrieving revision 1.76
diff -c -c -r1.76 cash.c
*** src/backend/utils/adt/cash.c	24 Nov 2007 15:28:02 -0000	1.76
--- src/backend/utils/adt/cash.c	24 Nov 2007 16:13:30 -0000
***************
*** 337,345 ****
  	strncpy((buf + count - strlen(csymbol) + 1), csymbol, strlen(csymbol));
  	count -= strlen(csymbol) - 1;
  
! 	/* XXX What does this do?  It seems to duplicate the last character. */
  	if (buf[LAST_DIGIT] == ssymbol)
! 		buf[LAST_DIGIT] = buf[LAST_PAREN];
  
  	/* see if we need to signify negative amount */
  	if (minus)
--- 337,349 ----
  	strncpy((buf + count - strlen(csymbol) + 1), csymbol, strlen(csymbol));
  	count -= strlen(csymbol) - 1;
  
! 	/*
! 	 *	If points == 0 and the number of digits % mon_group == 0,
! 	 *	the code above adds a trailing ssymbol on the far right,
! 	 *	so remove it.
! 	 */
  	if (buf[LAST_DIGIT] == ssymbol)
! 		buf[LAST_DIGIT] = '\0';
  
  	/* see if we need to signify negative amount */
  	if (minus)
