Re: psql: recall previous command?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Neil Conway <neilc@samurai.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2005-02-22T07:51:45Z
Lists: pgsql-hackers
Neil Conway <neilc@samurai.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