Improve psql's handling of multi-line queries

Started by Steve Woodcockalmost 21 years ago4 messagespatches
Jump to latest
#1Steve Woodcock
steve.woodcock@gmail.com

Hi all,

Attached is a patch for the following TODO item:

o Improve psql's handling of multi-line queries

Currently, while \e saves a single query as one entry, interactive
queries are saved one line at a time. Ideally all queries
whould be saved like \e does.

I know now's probably not a good time, but it caught my eye and looked
easy enough even for my rusty C.

Regards, Steve Woodcock

Attachments:

psql-history.patchtext/x-patch; charset=us-ascii; name=psql-history.patchDownload+63-21
#2Bruce Momjian
bruce@momjian.us
In reply to: Steve Woodcock (#1)
Re: Improve psql's handling of multi-line queries

This has been saved for the 8.2 release:

http://momjian.postgresql.org/cgi-bin/pgpatches_hold

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

Steve Woodcock wrote:

Hi all,

Attached is a patch for the following TODO item:

o Improve psql's handling of multi-line queries

Currently, while \e saves a single query as one entry, interactive
queries are saved one line at a time. Ideally all queries
whould be saved like \e does.

I know now's probably not a good time, but it caught my eye and looked
easy enough even for my rusty C.

Regards, Steve Woodcock

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Bruce Momjian
bruce@momjian.us
In reply to: Steve Woodcock (#1)
Re: Improve psql's handling of multi-line queries

Steve Woodcock wrote:

Hi all,

Attached is a patch for the following TODO item:

o Improve psql's handling of multi-line queries

Currently, while \e saves a single query as one entry, interactive
queries are saved one line at a time. Ideally all queries
whould be saved like \e does.

I know now's probably not a good time, but it caught my eye and looked
easy enough even for my rusty C.

Regards, Steve Woodcock

Steve, we have already applied a patch by Sergey E. Koposov to do this.
Would you review CVS HEAD and see that everything works as you would
like. Thanks.

--
Bruce Momjian http://candle.pha.pa.us
SRA OSS, Inc. http://www.sraoss.com

+ If your life is a hard drive, Christ can be your backup. +

#4Steve Woodcock
steve.woodcock@gmail.com
In reply to: Bruce Momjian (#3)
Re: Improve psql's handling of multi-line queries

On 21/03/06, Bruce Momjian <pgman@candle.pha.pa.us> wrote:

Steve, we have already applied a patch by Sergey E. Koposov to do this.
Would you review CVS HEAD and see that everything works as you would
like. Thanks.

Yeah it's good; stores multiline queries in .psql_history which is an
improvement over my patch.

Cheers, Steve