It's strange how this "Fatal error: Call to undefined function pg_connect()" happens(when everything else is OK) in PHP version 5.3.3.
I was trying to connect to my db when I got that error message the firs time. My extensions path was OK, pgsql extension should have been loaded from php.ini(i had enabled it before), Apache started-up without errors, but i still had the "Fatal error: Call to undefined function pg_connect()" message when i tried to connect.
Seaching a bit around i found something about dll libraries not working as they should, so deleted the new 5.3.3 version, downloaded the PHP 5.2.5 and configured it.
I'm using Windows XP Home SP3, Apache 2.2, PHP 5.2.5 and everything works fine now... ;)