The MacPorts Project (http://www.macports.org/) supports building
universal binaries (32/64bit binaries in one file) for most projects.
For PostgreSQL, they apply two patches after the configure script to
correct some of the typedefs. Otherwise, the build fails in compiling
a switch statement with duplicate cases.
The HomeBrew Project (http://mxcl.github.com/homebrew/) is a worthy
successor to MacPorts, but they don't yet support a --universal
argument for building PostgreSQL. There is currently a pull request on
github to add universal support, but it's based on the patches from
the MacPorts project.
It would be nice if the PostgreSQL project would make these patches unnecessary.
A diff of the HomeBrew pull request to add universal support:
https://github.com/mxcl/homebrew/pull/14111/files
The patches in question:
https://trac.macports.org/export/96361/trunk/dports/databases/postgresql91/files/pg_config.h.edhttps://trac.macports.org/export/96361/trunk/dports/databases/postgresql91/files/ecpg_config.h.ed
If someone were to fix this, to test if the fix worked you would need
a Mac with HomeBrew, the HomeBrew pull request above but without lines
70-74, and this command:
brew install postgresql --universal
Note that if you previously had postgresql installed with HomeBrew,
you would need to uninstall it first.
Cheers,
Doug