*** /rtmp/bad.out	2012-08-06 14:31:12.000000000 -0400
--- /rtmp/good.out	2012-08-06 14:30:26.000000000 -0400
***************
*** 1,7 ****
  SELECT to_date('-6  4', 'CC YY');
      to_date    
  ---------------
!  0697-01-01 BC
  (1 row)
  
  SELECT to_date(' 6  4', 'CC YY');
--- 1,7 ----
  SELECT to_date('-6  4', 'CC YY');
      to_date    
  ---------------
!  0504-01-01 BC
  (1 row)
  
  SELECT to_date(' 6  4', 'CC YY');
***************
*** 13,19 ****
  SELECT to_date('-6 00', 'CC YY');
      to_date    
  ---------------
!  0601-01-01 BC
  (1 row)
  
  SELECT to_date(' 6 00', 'CC YY');
--- 13,19 ----
  SELECT to_date('-6 00', 'CC YY');
      to_date    
  ---------------
!  0600-01-01 BC
  (1 row)
  
  SELECT to_date(' 6 00', 'CC YY');
***************
*** 25,31 ****
  SELECT to_date('-6', 'CC');
      to_date    
  ---------------
!  0700-01-01 BC
  (1 row)
  
  SELECT to_date(' 6', 'CC');
--- 25,31 ----
  SELECT to_date('-6', 'CC');
      to_date    
  ---------------
!  0600-01-01 BC
  (1 row)
  
  SELECT to_date(' 6', 'CC');
***************
*** 35,41 ****
  (1 row)
  
  SELECT to_date('-6  4 BC', 'CC YY BC');
! ERROR:  inconsistent use of year -696 and "BC"
  SELECT to_date(' 6  4 BC', 'CC YY BC');
      to_date    
  ---------------
--- 35,45 ----
  (1 row)
  
  SELECT to_date('-6  4 BC', 'CC YY BC');
!   to_date   
! ------------
!  0504-01-01
! (1 row)
! 
  SELECT to_date(' 6  4 BC', 'CC YY BC');
      to_date    
  ---------------
***************
*** 43,49 ****
  (1 row)
  
  SELECT to_date('-6 00 BC', 'CC YY BC');
! ERROR:  inconsistent use of year -600 and "BC"
  SELECT to_date(' 6 00 BC', 'CC YY BC');
      to_date    
  ---------------
--- 47,57 ----
  (1 row)
  
  SELECT to_date('-6 00 BC', 'CC YY BC');
!   to_date   
! ------------
!  0600-01-01
! (1 row)
! 
  SELECT to_date(' 6 00 BC', 'CC YY BC');
      to_date    
  ---------------
***************
*** 51,60 ****
  (1 row)
  
  SELECT to_date('-6 BC', 'CC BC');
! ERROR:  inconsistent use of year -699 and "BC"
  SELECT to_date(' 6 BC', 'CC BC');
      to_date    
  ---------------
!  0501-01-01 BC
  (1 row)
  
--- 59,72 ----
  (1 row)
  
  SELECT to_date('-6 BC', 'CC BC');
!   to_date   
! ------------
!  0501-01-01
! (1 row)
! 
  SELECT to_date(' 6 BC', 'CC BC');
      to_date    
  ---------------
!  0600-01-01 BC
  (1 row)
  
