[freeside] fs-setup issue

ivan at 420.am ivan at 420.am
Wed Nov 19 10:13:55 PST 2003


On Wed, Nov 19, 2003 at 05:39:30PM +1100, Bob Purdon wrote:
> Cannot specify both sql_type and pg_type at 
> /usr/local/lib/perl5/site_perl/5.6.1/FS/Record.pm line 272.

This is a bug in DBD::Pg 1.31.  The following patch should work around
the problem:

ivan at rootwood:~/freeside$ cvs diff -u FS/FS/Record.pm 
Index: FS/FS/Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.76
diff -u -r1.76 Record.pm
--- Record.pm   4 Nov 2003 10:57:05 -0000       1.76
+++ Record.pm   19 Nov 2003 18:09:38 -0000
@@ -313,9 +313,9 @@
     if ( $record->{$field} =~ /^\d+(\.\d+)?$/
          && $dbdef->table($table)->column($field)->type =~ /(int|serial)/i
     ) {
-      $sth->bind_param($bind++, $record->{$field}, { TYPE => SQL_INTEGER } );
+      $sth->bind_param($bind++, $record->{$field}, SQL_INTEGER );
     } else {
-      $sth->bind_param($bind++, $record->{$field}, { TYPE => SQL_VARCHAR } );
+      $sth->bind_param($bind++, $record->{$field}, SQL_VARCHAR );
     }
   }

-- 
_ivan



More information about the freeside-users mailing list