Dear Joshua,
this error message from Solaris has nothing to do with the postgres driver. If one is compiling a program from multiple sources, all components have to be compiled with the same pointer size (32bit or 64 bit). As written in [1] the install-ns.sh script compiles NaviServer and its the components with 64 bit. If you compile NaviServer modules yourself (i.e. outside the script), and you want to load these into a 64bit NaviServer, use 'export CC="gcc -m64"' and recompile the additional components again to get 64bit components.
best regards
-gustaf neumann
[1] https://openacs.org/forums/message-view?message_id=4143826