On Saturday, 13 January 2018 at 04:26:06 UTC, Adam D. Ruppe wrote:
If and only if the values are known at compile time, you can do:

const char** keywords = ["hostaddr".ptr, "port".ptr, "dbname".ptr, null].ptr;

or even do it inline:


PQconnectdbParams(["hostaddr".ptr, "port".ptr, "dbname".ptr, null].ptr, ditto_for_values, 1);

The keywords are (or could be) known at compile time, but almost by definition, the associated values are only known at runtime.

Reply via email to