Re: TODO item -- Improve psql's handling of multi-line queries - Mailing list pgsql-patches

From Andreas Seltenreich
Subject Re: TODO item -- Improve psql's handling of multi-line queries
Date
Msg-id 87psp150sd.fsf@gate450.dyndns.org
Whole thread Raw
In response to TODO item -- Improve psql's handling of multi-line queries  ("Sergey E. Koposov" <math@sai.msu.ru>)
Responses Re: TODO item -- Improve psql's handling of multi-line queries  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Sergey E. Koposov writes:

> I'm proposing the small patch for the TODO item -- Improve psql's handling
> of multi-line queries. With this patch the multi-line queries are saved
> by readline as whole and not line by line.

I like it already!

> This is my first patch for Postgres but it seems to work and to not break
> anything.
>
> I'm waiting for review, comments, objections, etc...

Did you consider its interaction with \e? Editing the query_buffer
with \e will leave that query prefixed with \e in the history. That
wasn't the case before your patch.

Also, using \e several times on a query without sending it (i.e.
without a semicolon) will yield a history entry of a concatenation of
old query buffers.

Thanks,
Andreas

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Per-table freeze limit proposal
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Per-table freeze limit proposal