snprintf(data, len, %s, NULL) crash.
The code was trying to find a connection by name when it already had an
unnamed connection and did not have a name to search with.
Kris Jurka
conname = GET_STR(PG_GETARG_TEXT_P(0));
curname = GET_STR(PG_GETARG_TEXT_P(1));
sql = GET_STR(PG_GETARG_TEXT_P(2));
+ rcon = getConnectionByName(conname);
+ if (rcon)
+ conn = rcon->con;
}
- rcon = getConnectionByName(conname);
- if (rcon)
- conn = rcon->con;
}
else if (PG_NARGS() == 4)
{