Re: psql history vs. dearmor (pgcrypto) - Mailing list pgsql-hackers

From Robert Haas
Subject Re: psql history vs. dearmor (pgcrypto)
Date
Msg-id CA+TgmoZWe8Q28ndv7W=kCuYae=_wiCoGvfYEKvpRKj-1YXmjnw@mail.gmail.com
Whole thread Raw
In response to psql history vs. dearmor (pgcrypto)  (Tomas Vondra <tv@fuzzy.cz>)
List pgsql-hackers
2011/11/13 Tomas Vondra <tv@fuzzy.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

pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: CommitFest 2011-11 starting soon
Next
From: Jeff Davis
Date:
Subject: Re: Cause of intermittent rangetypes regression test failures