If you do a configure --with-pgsql you normally see this: checking for PostgresSQL support... yes checking for PQcmdTuples... yes :which detects cmdTuples, and defines HAVE_PGCMDTUPLES, however since mod_php3 is no longer being compiled with built in pgsql support, that is no longer being passed to configure, and the resulting module doesn't contain this support. You should be able to simply -D this into the gcc statement that compiles the pgsql support, but a better option might be to redo the configure statement before compiling each module, and include the required --with (or just do this once after compiling the main php3 module with the --with for ALL the later compiled modules). That way any new configuration options that are needed by the modules will be compiled in as the PHP people add them.
this has been fixed for the next release (6.1) in php-3.0.12-3 and later.
php-3.0.12-4 still does not include pg_cmdtuples() support
Sorry, this is probably my fault. I stated that the correct define was HAVE_PGCMDTUPLES, when it is really HAVE_PQCMDTUPLES, with a Q instead of the G. This affects the following line in the spec file: gcc -shared -fPIC -DCOMPILE_DL=1 -DHAVE_PGCMDTUPLES -I. - I/usr/include/apache \ -I/usr/include/pgsql -o pgsql.so \ ./functions/pgsql.c -lpq -lc
fixed in the 3.0.12-5 build.