[asterisk-bugs] [JIRA] (ASTERISK-27283) Realtime config fail with PostgreSQL version before 9.1

Asterisk Team (JIRA) noreply at issues.asterisk.org
Wed Sep 20 21:18:08 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238800#comment-238800 ] 

Asterisk Team commented on ASTERISK-27283:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> Realtime config fail with PostgreSQL version before 9.1
> -------------------------------------------------------
>
>                 Key: ASTERISK-27283
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27283
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_config_pgsql
>         Environment: Linux 
> PostgreSQL 8.4.21 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 32-bit
>            Reporter: Rodrigo Ramirez Norambuena
>
> When is used a previous version of PostgreSQL than 9.1 the realtime fail because the is need double backslash to use ESCAPE
> Log
> Using `queue show`
> {code}
> [Sep 19 08:48:19] DEBUG[15708]: res_config_pgsql.c:227 pgsql_exec: PostgreSQL query attempt 1
> [Sep 19 08:48:19] ERROR[15708]: res_config_pgsql.c:165 _pgsql_exec: PostgreSQL RealTime: Failed to query 'queues at asterisk'.
> [Sep 19 08:48:19] ERROR[15708]: res_config_pgsql.c:166 _pgsql_exec: PostgreSQL RealTime: Query Failed: SELECT * FROM queues WHERE name LIKE '%' ESCAPE '\' ORDER BY name
> [Sep 19 08:48:19] ERROR[15708]: res_config_pgsql.c:167 _pgsql_exec: PostgreSQL RealTime: Query Failed because: ERROR:  unterminated quoted string at or near «'\' ORDER BY name»
> LINE 1: SELECT * FROM queues WHERE name LIKE '%' ESCAPE '\' ORDER BY...
>                                                         ^
>  (PGRES_FATAL_ERROR)
> [Sep 19 08:48:19] DEBUG[15708]: res_config_pgsql.c:227 pgsql_exec: PostgreSQL query attempt 1
> [Sep 19 08:48:19] DEBUG[15708]: res_config_pgsql.c:183 _pgsql_exec: PostgreSQL query successful: SELECT * FROM queues WHERE name = 'queue_test'
> [Sep 19 08:48:19] DEBUG[15708]: res_config_pgsql.c:481 realtime_pgsql: PostgreSQL RealTime: Result=0x939dbe0 Query: SELECT * FROM queues WHERE name = 'queue_test'
> [Sep 19 08:48:19] DEBUG[15708]: res_config_pgsql.c:489 realtime_pgsql: PostgreSQL RealTime: Found 1 rows.
> [Sep 19 08:48:19] DEBUG[15708]: res_config_pgsql.c:227 pgsql_exec: PostgreSQL query attempt 1
> [Sep 19 08:48:19] ERROR[15708]: res_config_pgsql.c:165 _pgsql_exec: PostgreSQL RealTime: Failed to query 'queue_members at asterisk'.
> [Sep 19 08:48:19] ERROR[15708]: res_config_pgsql.c:166 _pgsql_exec: PostgreSQL RealTime: Query Failed: SELECT * FROM queue_members WHERE interface LIKE '%' ESCAPE '\' AND queue_name = 'queue_test' ORDER BY interface
> [Sep 19 08:48:19] ERROR[15708]: res_config_pgsql.c:167 _pgsql_exec: PostgreSQL RealTime: Query Failed because: ERROR: syntax error at or near «queue_test»
> LINE 1: ...E interface LIKE '%' ESCAPE '\' AND queue_name = 'queue_test' ORDE...
>                                                              ^
>  (PGRES_FATAL_ERROR)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list