after trying to build postgresql-6.5.1-0.7, i found that i was missing python-devel. since rpm 3.x you can make BuildPrereq: for packages needed by building, i thing BuildPrereq: python-devel should be used. there could be other BuildPrereq: i didn't notice take in consideration too
oops, the real hidden BuildPrereq was bison-devel but python-devel would be needed too
Lots of packages don't have correct BuildPreq's -- we'll get there :-)