On Mon, 2002-03-11 at 17:44, Bruce Momjian wrote:
>
> Is this change required:
>
>
> &end_of_cmd);
>
> ! success = slashCmdStatus != CMD_ERROR;
>
> if ((slashCmdStatus == CMD_SEND || slashCmdStatus == CMD_NEWEDIT) &&
> query_buf->len == 0)
> --- 467,473 ----
> query_buf->len > 0 ? query_buf : previous_buf,
>
> &end_of_cmd);
>
> ! success = (slashCmdStatus != CMD_ERROR);
>
>
> I thought != was done before =, and my associativity chart shows that:
Yes, that is correct. That change was just for readability (IMHO, it's
silly to depend on operator precedence when a pair of brackets makes the
intent of the code a lot clearer).
The actual functional change is the second part of the patch:
*** 476,482 ****
appendPQExpBufferStr(query_buf,
previous_buf->data);
}
! if (slashCmdStatus == CMD_SEND)
{
success =
SendQuery(query_buf->data);
query_start = i + thislen;
--- 476,482 ----
appendPQExpBufferStr(query_buf,
previous_buf->data);
}
! if (slashCmdStatus == CMD_SEND ||
slashCmdStatus == CMD_ERROR)
{
success =
SendQuery(query_buf->data);
query_start = i + thislen;
Cheers,
Neil
--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC