Index: src/backend/commands/analyze.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/commands/analyze.c,v
retrieving revision 1.136
diff -c -r1.136 analyze.c
*** src/backend/commands/analyze.c	5 May 2009 18:02:11 -0000	1.136
--- src/backend/commands/analyze.c	18 May 2009 11:43:05 -0000
***************
*** 363,381 ****
  	}
  
  	/*
! 	 * Quit if no analyzable columns
  	 */
! 	if (attr_cnt <= 0 && !analyzableindex)
! 	{
! 		/*
! 		 * We report that the table is empty; this is just so that the
! 		 * autovacuum code doesn't go nuts trying to get stats about a
! 		 * zero-column table.
! 		 */
! 		if (update_reltuples)
! 			pgstat_report_analyze(onerel, 0, 0);
  		goto cleanup;
- 	}
  
  	/*
  	 * Determine how many rows we need to sample, using the worst case from
--- 363,372 ----
  	}
  
  	/*
! 	 * Quit if no analyzable columns and no pg_class update needed.
  	 */
! 	if (attr_cnt <= 0 && !analyzableindex && !update_reltuples)
  		goto cleanup;
  
  	/*
  	 * Determine how many rows we need to sample, using the worst case from
