Skip to content

Commit

Permalink
db_postgres: added missing break for INT8OID results
Browse files Browse the repository at this point in the history
- instead of DB1_BIGINT, the result type ended to be DB1_DOUBLE

(cherry picked from commit d12f96a)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent 40586c4 commit d620b8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/db_postgres/km_res.c
Expand Up @@ -15,8 +15,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
Expand Down Expand Up @@ -131,6 +131,7 @@ int db_postgres_get_columns(const db1_con_t* _h, db1_res_t* _r)
case INT8OID:
LM_DBG("use DB1_BIGINT result type\n");
RES_TYPES(_r)[col] = DB1_BIGINT;
break;

case FLOAT4OID:
case FLOAT8OID:
Expand Down Expand Up @@ -165,7 +166,7 @@ int db_postgres_get_columns(const db1_con_t* _h, db1_res_t* _r)
LM_DBG("use DB1_BITMAP result type\n");
RES_TYPES(_r)[col] = DB1_BITMAP;
break;

default:
LM_WARN("unhandled data type column (%.*s) type id (%d), "
"use DB1_STRING as default\n", RES_NAMES(_r)[col]->len,
Expand Down

0 comments on commit d620b8e

Please sign in to comment.