Thread: [PATCH] Improve bytea error messages
Hi all After someone reported somewhat less than informative errors in bytea decoding (http://stackoverflow.com/q/24588866/398670) I thought I'd put together a quick patch to improve the errors here. Please merge. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Attachment
On Sun, Jul 6, 2014 at 4:17 AM, Craig Ringer <craig@2ndquadrant.com> wrote: > After someone reported somewhat less than informative errors in bytea > decoding (http://stackoverflow.com/q/24588866/398670) I thought I'd put > together a quick patch to improve the errors here. The first two changes seem fine from here, but I think the use of parentheses in the third one likely violates our message style guidelines. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On 07/08/2014 07:44 AM, Robert Haas wrote: > On Sun, Jul 6, 2014 at 4:17 AM, Craig Ringer <craig@2ndquadrant.com> wrote: >> After someone reported somewhat less than informative errors in bytea >> decoding (http://stackoverflow.com/q/24588866/398670) I thought I'd put >> together a quick patch to improve the errors here. > > The first two changes seem fine from here, but I think the use of > parentheses in the third one likely violates our message style > guidelines. Good point. Better? Putting it in ERRHINT is more appropriate. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Attachment
On Tue, Jul 8, 2014 at 12:49 AM, Craig Ringer <craig@2ndquadrant.com> wrote: > On 07/08/2014 07:44 AM, Robert Haas wrote: >> On Sun, Jul 6, 2014 at 4:17 AM, Craig Ringer <craig@2ndquadrant.com> wrote: >>> After someone reported somewhat less than informative errors in bytea >>> decoding (http://stackoverflow.com/q/24588866/398670) I thought I'd put >>> together a quick patch to improve the errors here. >> >> The first two changes seem fine from here, but I think the use of >> parentheses in the third one likely violates our message style >> guidelines. > > Good point. > > Better? > > Putting it in ERRHINT is more appropriate. Looks OK to me. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company