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

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jul 9 14:19:04 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17478 
====================================================================== 
Reported By:                kobaz
Assigned To:                lmadsen
====================================================================== 
Project:                    Asterisk
Issue ID:                   17478
Category:                   CDR/cdr_pgsql
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
JIRA:                       SWP-1817 
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-07-09 14:19 CDT
====================================================================== 
Summary:                    [patch] 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
====================================================================== 

---------------------------------------------------------------------- 
 (0124415) lmadsen (administrator) - 2010-07-09 14:19
 https://issues.asterisk.org/view.php?id=17478#c124415 
---------------------------------------------------------------------- 
I'm going to commit this. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-07-09 14:19 lmadsen        Note Added: 0124415                          
======================================================================




More information about the asterisk-bugs mailing list