[asterisk-bugs] [Asterisk 0017478]: cdr_pgsql does not detect when a table is not found

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Jun 6 15:48:34 CDT 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17478 
====================================================================== 
Reported By:                kobaz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17478
Category:                   CDR/cdr_pgsql
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 268572 
Request Review:              
====================================================================== 
Date Submitted:             2010-06-06 15:48 CDT
Last Modified:              2010-06-06 15:48 CDT
====================================================================== 
Summary:                    cdr_pgsql does not detect when a table is not found
Description: 
In 1.6.1/1.6.2/trunk 

With a standard cdr_pgsql config... and having not yet created the table
called cdr..

[global]
hostname=localhost
port=5432
dbname=pbx
password=pass
user=root
table=cdr


We get the following, when trying to insert a cdr record


[Jun  6 16:34:06] ERROR[6723]: cdr_pgsql.c:311 pgsql_log: cdr_pgsql:
Connection may have been lost... attempting to reconnect.
[Jun  6 16:34:06] ERROR[6723]: cdr_pgsql.c:314 pgsql_log: cdr_pgsql:
Connection reestablished.
[Jun  6 16:34:06] ERROR[6723]: cdr_pgsql.c:320 pgsql_log: cdr_pgsql: HARD
ERROR!  Attempted reconnection failed.  DROPPING CALL RECORD!
[Jun  6 16:34:06] ERROR[6723]: cdr_pgsql.c:321 pgsql_log: cdr_pgsql:
Reason: ERROR:  syntax error at or near ")"
LINE 1: INSERT INTO cdr ) VALUES )
                                     ^
Patch attached
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-06 15:48 kobaz          New Issue                                    
2010-06-06 15:48 kobaz          Asterisk Version          => SVN             
2010-06-06 15:48 kobaz          Regression                => No              
2010-06-06 15:48 kobaz          SVN Branch (only for SVN checkouts, not tarball
releases) =>  trunk          
2010-06-06 15:48 kobaz          SVN Revision (number only!) => 268572          
======================================================================




More information about the asterisk-bugs mailing list