Skip to content

Commit

Permalink
Use SQL_DRIVER_NOPROMPT for SQLDriverConnect
Browse files Browse the repository at this point in the history
Some drivers (sqlite) are notorious for popping up dialog boxes
if something is off with connection string.
We cannot show anything GUI since PostgreSQL runs as daemon/service.
  • Loading branch information
mlt committed Aug 24, 2020
1 parent d362ada commit f88dbed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odbc_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ odbc_connection(odbcFdwOptions* options, SQLHENV *env, SQLHDBC *dbc)
SQLAllocHandle(SQL_HANDLE_DBC, *env, dbc);
/* Connect to the DSN */
ret = SQLDriverConnect(*dbc, NULL, (SQLCHAR *) conn_str.data, SQL_NTS,
OutConnStr, 1024, &OutConnStrLen, SQL_DRIVER_COMPLETE);
OutConnStr, 1024, &OutConnStrLen, SQL_DRIVER_NOPROMPT);
check_return(ret, "Connecting to driver", dbc, SQL_HANDLE_DBC);
elog_debug("Connection opened");
}
Expand Down

0 comments on commit f88dbed

Please sign in to comment.