No need to use strlen() with StringInfoData.

This commit is contained in:
Josh Kupershmidt 2012-11-26 20:08:47 -07:00
parent 7e4f811381
commit d402a73e42

View File

@ -67,7 +67,7 @@ execute_with_format(int expected, const char *format, ...)
appendStringInfoVA_s(&sql, format, ap);
va_end(ap);
if (strlen(sql.data) == 0)
if (sql.len == 0)
elog(WARNING, "execute_with_format(%s)", format);
ret = SPI_exec(sql.data, 0);
if EXEC_FAILED(ret, expected)