Re: psql misbehaves because of a simple typo - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: psql misbehaves because of a simple typo
Date
Msg-id 200112280420.fBS4KX125359@candle.pha.pa.us
Whole thread Raw
In response to Re: psql misbehaves because of a simple typo  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql misbehaves because of a simple typo
List pgsql-hackers
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > The fact that backslash commands inside parens clear the
> > counter is a minor anoyance but resonable behavior.
> 
> If they cleared the command buffer too, it might be construed
> as novice-friendly behavior (though I'd still call it broken).
> However, letting the counter get out of sync with the buffer
> contents cannot be called anything but a bug.

OK, so what do we want to do?  Clearing the buffer on a any backslash
command is clearly not what we want to do.  Should we clear the buffer
on a backslash command _only_ if the number of paren's is not even?  If
we don't clear the counter on a backslash command with uneven parens, do
we risk trapping people in psql?

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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql misbehaves because of a simple typo
Next
From: Tom Lane
Date:
Subject: Re: psql misbehaves because of a simple typo