Thread: Improve psql's handling of multi-line queries
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
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
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. +
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