Definition at line 1198 of file pgsql2shp-core.c.
References shp_connection_state::database, shp_connection_state::host, malloc(), shp_connection_state::password, shp_connection_state::port, and shp_connection_state::username.
Referenced by connection_test(), pgui_action_import(), ShpDumperConnectDatabase(), and update_table_chooser_from_database().
1204 (conn->
host ? strlen(conn->
host) : 0) + (conn->port ? strlen(conn->port) : 0) +
1205 (conn->username ? strlen(conn->username) : 0) + (conn->password ? strlen(conn->password) : 0) +
1206 (conn->database ? strlen(conn->database) : 0);
1208 connstring =
malloc(connlen);
1209 memset(connstring, 0, connlen);
1213 strcat(connstring,
" host=");
1214 strcat(connstring, conn->
host);
1219 strcat(connstring,
" port=");
1220 strcat(connstring, conn->
port);
1225 strcat(connstring,
" user=");
1226 strcat(connstring, conn->
username);
1231 strcat(connstring,
" password='");
1232 strcat(connstring, conn->
password);
1233 strcat(connstring,
"'");
1238 strcat(connstring,
" dbname=");
1239 strcat(connstring, conn->
database);
1242 if ( ! getenv(
"PGCLIENTENCODING") )
1244 strcat(connstring,
" client_encoding=UTF8");