Index: src/backend/utils/adt/formatting.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v
retrieving revision 1.168
diff -c -c -r1.168 formatting.c
*** src/backend/utils/adt/formatting.c	26 Feb 2010 02:01:08 -0000	1.168
--- src/backend/utils/adt/formatting.c	3 Mar 2010 03:29:05 -0000
***************
*** 2671,2685 ****
  				s += SKIP_THth(n->suffix);
  				break;
  			case DCH_Q:
! 
! 				/*
! 				 * We ignore Q when converting to date because it is not
! 				 * normative.
! 				 *
! 				 * We still parse the source string for an integer, but it
! 				 * isn't stored anywhere in 'out'.
! 				 */
! 				from_char_parse_int((int *) NULL, &s, n);
  				s += SKIP_THth(n->suffix);
  				break;
  			case DCH_CC:
--- 2671,2678 ----
  				s += SKIP_THth(n->suffix);
  				break;
  			case DCH_Q:
! 				from_char_parse_int(&out->mm, &s, n);
! 				out->mm = (out->mm - 1) * 3 + 1;
  				s += SKIP_THth(n->suffix);
  				break;
  			case DCH_CC:
