Skip site navigation (1) Skip section navigation (2)

Re: psql: recall previous command?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: recall previous command?
Date: 2005-02-22 07:51:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Neil Conway <neilc(at)samurai(dot)com> writes:
> - when a multiple-line command is recalled, how should it be presented 
> in the psql input buffer? Perhaps we could strip newlines from recalled 
> command text, so that the recalled command would fit on a single line. 

That fails on at least three cases: -- comments, newlines separating
parts of quoted literals (cf bizarre SQL spec requirement that adjacent
literals are merged only if separated by a newline), and newlines
embedded in quoted literals.  You could possibly work around the first
two cases by doing nontrivial editing of the query string, but I see no
way around the last one.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2005-02-22 10:32:09
Subject: int64/double for time/timestamp
Previous:From: Ian BarwickDate: 2005-02-22 07:18:19
Subject: Re: psql: recall previous command?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group