Re: Misleading error message in logical decoding for binary plugins - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Misleading error message in logical decoding for binary plugins
Date
Msg-id CA+TgmoYzZpKSnUX406e2B-OzKjGDyJEywkBjHhSTiD9i6CnOjQ@mail.gmail.com
Whole thread Raw
In response to Re: Misleading error message in logical decoding for binary plugins  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Misleading error message in logical decoding for binary plugins
List pgsql-hackers
On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> On 2014-08-29 22:42:46 +0900, Michael Paquier wrote:
>> Hi all,
>>
>> Using a plugin producing binary output, I came across this error:
>> =# select data from pg_logical_slot_peek_changes('foo', NULL, NULL);
>> ERROR:  0A000: output plugin cannot produce binary output
>> LOCATION:  pg_logical_slot_get_changes_guts, logicalfuncs.c:404
>>
>> Shouldn't the error message be here something like "binary output plugin
>> cannot produce textual output"? The plugin used in my case produces binary
>> output, but what is requested from it with pg_logical_slot_peek_changes is
>> textual output.
>
> I don't like the new message much. It's imo even more misleading than
> the old message. How about
> "output pluing produces binary output but the sink only accepts textual data"?

Maybe:

ERROR: pg_logical_slot_peek_changes cannot be used with a plugin that
produces only binary output
HINT: Use pg_logical_slot_peek_binary_changes instead.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Inverse of pg_get_serial_sequence?
Next
From: Robert Haas
Date:
Subject: Re: [v9.5] Custom Plan API