From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: psql: backslash fix |
Date: | 2002-03-11 22:49:33 |
Message-ID: | 1015886973.2119.11.camel@jiro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
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(at)rogers(dot)com>
PGP Key ID: DB3C29FC
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-03-11 22:50:46 | Re: psql: backslash fix |
Previous Message | Bruce Momjian | 2002-03-11 22:44:26 | Re: psql: backslash fix |