Index: forward.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/forward/forward.install,v
retrieving revision 1.2.2.7
diff -b -u -p -r1.2.2.7 forward.install
--- forward.install	15 Sep 2008 12:23:07 -0000	1.2.2.7
+++ forward.install	22 Oct 2008 09:08:14 -0000
@@ -21,9 +21,9 @@ function forward_install() {
       break;
     case 'pgsql':
       $query1 = db_query("CREATE TABLE {forward_log} (
-        path text NOT NULL default '<front>',
-        type text NOT NULL,
-        timestamp integer NOT NULL
+        path varchar(255) NOT NULL default '<front>',
+        type varchar(8) NOT NULL default '',
+        timestamp integer NOT NULL default '0'
       )");
       $query2 = db_query("CREATE TABLE {forward_statistics} (
         nid integer NOT NULL,
@@ -33,7 +33,7 @@ function forward_install() {
         PRIMARY KEY (nid)
       )");
       db_query("CREATE INDEX idx_forward_log_path ON {forward_log} (path);");
-      db_query("CREATE INDEX {forward_statistics}_timestamp_idx ON {forward_statistics}(last_forward_timestamp);");
+      db_query("CREATE INDEX {forward_statistics}_last_forward_timestamp_idx ON {forward_statistics} (last_forward_timestamp);");
       break;
     default:
       break;
@@ -95,11 +95,18 @@ function forward_update_2() {
  * Changed forward_statistics to handle non-node paths
  */
 function forward_update_3() {
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
   $ret[] = update_sql("ALTER TABLE {forward_log} ADD COLUMN path varchar(255) NOT NULL default '<front>' FIRST");
-  $ret[] = update_sql("UPDATE {forward_log} SET path = CONCAT('node/',nid) WHERE nid != 0");
+      break;
+    case 'pgsql':
+      db_add_column($ret, 'forward_log', 'path', 'varchar', array('size' => 255, 'default' => "'<front>'", 'not null' => TRUE));
+      break;
+  }
+  $ret[] = update_sql("UPDATE {forward_log} SET path = CONCAT('node/', nid) WHERE nid != 0");
   $ret[] = update_sql("UPDATE {forward_log} SET path = '<front>' WHERE nid = 0");
   $ret[] = update_sql("ALTER TABLE {forward_log} DROP COLUMN nid");
-  
   return $ret;
 }
 
