Skip to content

Commit

Permalink
changes suggested by dmitry
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak committed Mar 20, 2016
1 parent 3e037a8 commit 26e9383
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gdal/frmts/postgisraster/postgisrasterdataset.cpp
Expand Up @@ -2547,7 +2547,7 @@ GetConnectionInfo(const char * pszFilename,
/*Implementation suggested by dimitry
/**
* If the dbname is not provided by the user then make it NULL.
**
**/
if (nPos == -1) {
*ppszUser = NULL;
}
Expand All @@ -2556,15 +2556,15 @@ GetConnectionInfo(const char * pszFilename,
CPLStrdup(CPLParseNameValue(papszParams[nPos], NULL));

}
*/
// implementation 1 suggested by sarthak

/* implementation 1 suggested by sarthak
/**
* Get the Database name , Cases:
* 1. if the database is mentioned in the command.
* 2. else if the database name is present in POSTGIS env var (PGDATABASE)
* 3. else the default user name will be the database name
* 4. ppzDbname will be empty string.
*/
**
nPos = CSLFindName(papszParams, "user");
if (nPos != -1) {
Expand All @@ -2589,6 +2589,7 @@ GetConnectionInfo(const char * pszFilename,
strcpy(*ppszDbname, *ppszUser);
else
*ppszDbname = NULL;
*/

/**
* Case 2: There's database name, but no table name: activate a flag
Expand Down

0 comments on commit 26e9383

Please sign in to comment.