Re: psql: backslash fix

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: psql: backslash fix
Date: 2002-03-11 22:50:46
Message-ID: 200203112250.g2BMokE24929@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Oh, just checking. Thank you.

---------------------------------------------------------------------------

Neil Conway wrote:
> 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
>
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-03-11 22:51:22 Re: Domain Patch
Previous Message Neil Conway 2002-03-11 22:49:33 Re: psql: backslash fix