[freeside-users] [Fixed] Postgres complaint when running freeside-daily, type casts, "ERROR: operator does not exist"

Frances Albemuth frances.cincinattus at gmail.com
Tue Nov 18 08:07:01 PST 2008


 So I *thought* I had RTFM, but not closely enough.  I was missing the
TZ environment variable when running it by hand and assumed when I saw
this that things weren't working.  Sorry to have wasted anybody's
time.

 -FC

---------- Forwarded message ----------
From: Frances Albemuth <frances.cincinattus at gmail.com>
Date: Tue, Nov 18, 2008 at 8:55 AM
Subject: Postgres complaint when running freeside-daily, type casts,
"ERROR: operator does not exist"
To: freeside-users at sisd.com


 Hi all,

 I am new to Freeside.  I've run into a problem and I'm hoping for a
little guidance.  Here's what I've got:

 Debian Etch
 Perl 5.8.8
 HTML::Mason 1.40
 DBD::Pg 2.11.4
 DBI 1.607
 Postgresql 8.1.13

 When running freeside-daily, I receive this:

DBD::Pg::st execute failed: ERROR:  operator does not exist: integer <=
HINT:  No operator matches the given name and argument type(s). You
may need to add explicit type casts. [for Statement "SELECT * FROM
cust_main  WHERE (     0 < ( select count(*) from cust_pkg
           where cust_main.custnum = cust_pkg.custnum
             and ( cancel is null or cancel = 0 )
             and (    setup is null or setup =  0
                   or bill  is null or bill  <=
                   or ( expire is not null and expire <= 1227023268 )
                   or ( adjourn is not null and adjourn <= 1227023268 )
                 )
       )
 OR     0 < ( select count(*) from cust_bill
           where cust_main.custnum = cust_bill.custnum
             and 0 < charged
                     - coalesce(
                                 ( select sum(amount) from cust_bill_pay
                                     where cust_bill.invnum =
cust_bill_pay.invnum )
                                 ,0
                               )
                     - coalesce(
                                 ( select sum(amount) from cust_credit_bill
                                     where cust_bill.invnum =
cust_credit_bill.invnum )
                                 ,0
                               )
             and 0 < ( select count(*) from part_bill_event
                         where payby = cust_main.payby
                           and ( disabled is null or disabled = '' )
                           and seconds <=  - cust_bill._date
                           and 0 = ( select count(*) from cust_bill_event
                                      where cust_bill.invnum =
cust_bill_event.invnum
                                        and part_bill_event.eventpart
= cust_bill_event.eventpart
                                        and status = 'done'
                                   )

                     )
       )
 )"] at /usr/local/share/perl/5.8.8/FS/Record.pm line 391.
Error executing "SELECT * FROM cust_main  WHERE (     0 < ( select
count(*) from cust_pkg
           where cust_main.custnum = cust_pkg.custnum
             and ( cancel is null or cancel = 0 )
             and (    setup is null or setup =  0
                   or bill  is null or bill  <=
                   or ( expire is not null and expire <= 1227023268 )
                   or ( adjourn is not null and adjourn <= 1227023268 )
                 )
       )
 OR     0 < ( select count(*) from cust_bill
           where cust_main.custnum = cust_bill.custnum
             and 0 < charged
                     - coalesce(
                                 ( select sum(amount) from cust_bill_pay
                                     where cust_bill.invnum =
cust_bill_pay.invnum )
                                 ,0
                               )
                     - coalesce(
                                 ( select sum(amount) from cust_credit_bill
                                     where cust_bill.invnum =
cust_credit_bill.invnum )
                                 ,0
                               )
             and 0 < ( select count(*) from part_bill_event
                         where payby = cust_main.payby
                           and ( disabled is null or disabled = '' )
                           and seconds <=  - cust_bill._date
                           and 0 = ( select count(*) from cust_bill_event
                                      where cust_bill.invnum =
cust_bill_event.invnum
                                        and part_bill_event.eventpart
= cust_bill_event.eventpart
                                        and status = 'done'
                                   )

                     )
       )
 )": ERROR:  operator does not exist: integer <=
HINT:  No operator matches the given name and argument type(s). You
may need to add explicit type casts. at
/usr/local/share/perl/5.8.8/FS/Cron/bill.pm line 77

I started out with PostgreSQL 8.3 and after a little bit of research,
got the impression that new to 8.3 is all kinds of type cast
enforcement, so I moved to a 8.1 DB, but I run into the same problem.
I'm wondering if I somehow built the DB incorrectly, though I adhered
very closely to the directions found here:

http://www.freeside.biz/mediawiki/index.php/Freeside:1.7:Documentation:Installation

 Thanks for any advice, and apologies if I've left out anything important.

 -FC


More information about the freeside-users mailing list