Re: psql history vs. dearmor (pgcrypto)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql history vs. dearmor (pgcrypto)
Date: 2011-11-14 18:01:28
Message-ID: CA+TgmoZWe8Q28ndv7W=kCuYae=_wiCoGvfYEKvpRKj-1YXmjnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/11/13 Tomas Vondra <tv(at)fuzzy(dot)cz>:
> but recalling it from the query buffer results in
>
>  ERROR:  Corrupt ascii-armor
>
> I've noticed this on 9.1 but 9.2devel behaves exactly the same. I'm
> using 64-bit Linux with UTF8, nothing special.

It looks like the problem is that the original has a blank line after
the line that says "Version: GnuPG v2.0.17 (GNU/Linux)", but when you
recall it from the query buffer, that extra blank line gets elided.

The attached patch fixes it for me. I'm a little worried it might
cause a problem in some case I'm not thinking about, but I can't think
of any such case right this minute.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
save-empty-lines.patch application/octet-stream 480 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2011-11-14 18:06:01 Re: Cause of intermittent rangetypes regression test failures
Previous Message Greg Smith 2011-11-14 17:49:00 CommitFest 2011-11 starting soon