The postgreSQL 6.5.2 (RH6.1) and 6.5.3 (rawhide) SRPMs fail with an error if an attempt is made to use the rpm --rebuild command. It appears that the configure script cannot determine the system type and no Makefile is created, resulting in a make failure. This is a bit of problem as the binary RPMs fail to work at all on Ultra Sparcs (and probably other 64 bit architecures). A simple one-line patch is available to fix the problem but it appears that compiling and installing postgreSQL from the SRPMS is itself a non-trivial procedure.
If you're rebuilding on a sparc64 platform, you will need to do sparc32 rpm --rebuild postgres*.src.rpm Using sparc32 is necessary for many src.rpm's. Otherwise, please indicate the error that you are seeing.
I believe this problem is resolved. Please reopen if not.