Connecting to multiple databases of different type for form submission
In Drupal 6 you cannot use more than one database engine with Drupal's functions. If you are using MySQL as Drupal storage, to connect to PostgreSQL you need to directly call PDO:

try {
  $dbh = new PDO('pgsql:host=localhost;port=5432;dbname=testdb;user=bruce;password=mypass');
} catch (PDOException $e) {
  watchdog("your module name",
           "PDO error: %error",
           array("%error" =&gt; $e-&gt;getMessage() ),
           WATCHDOG_ERROR);
}


Then use your handler just as you would in any non-Drupal PHP code, preferably with prepared statements.