From c082b1b1f47bc41ea9617a7a03955f455fca2fcd Mon Sep 17 00:00:00 2001 From: Mindaugas Kavaliauskas Date: Wed, 22 May 2013 14:18:11 +0300 Subject: [PATCH] 2013-05-22 14:15 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * contrib/sddpg/core.c ! added missing parentheses in last commit --- ChangeLog.txt | 6 +++++- contrib/sddpg/core.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 8b074ccfdc..f6928f6a6f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,8 +10,12 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-05-22 14:15 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * contrib/sddpg/core.c + ! added missing parentheses in last commit + 2013-05-22 13:29 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) - * /contrib/sddpg/core.c + * contrib/sddpg/core.c + enhanced connection parameters support. Now it is possible to connect to PostgreSQL server using: 1) URI string diff --git a/contrib/sddpg/core.c b/contrib/sddpg/core.c index c8b8563754..d66a7110de 100644 --- a/contrib/sddpg/core.c +++ b/contrib/sddpg/core.c @@ -172,7 +172,7 @@ static HB_ERRCODE pgsqlConnect( SQLDDCONNECTION * pConnection, PHB_ITEM pItem ) const char * pszHost; pszHost = hb_arrayGetCPtr( pItem, 2 ); - if( pszHost && strncmp( pszHost, "postgresql://", 13 ) == 0 || strchr( pszHost, '=' ) ) + if( pszHost && ( strncmp( pszHost, "postgresql://", 13 ) == 0 || strchr( pszHost, '=' ) ) ) pConn = PQconnectdb( pszHost ); else pConn = PQsetdbLogin( pszHost, hb_arrayGetCPtr( pItem, 6 ), hb_arrayGetCPtr( pItem, 7 ), hb_arrayGetCPtr( pItem, 8 ), hb_arrayGetCPtr( pItem, 5 ), hb_arrayGetCPtr( pItem, 3 ), hb_arrayGetCPtr( pItem, 4 ) );