Misleading error message in logical decoding for binary plugins

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Misleading error message in logical decoding for binary plugins
Date: 2014-08-29 13:42:46
Message-ID: CAB7nPqQrqFzjqCjxu4GZzTrD9kpj6HMn9G5aOOMwt1WZ8NfqeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

A patch is attached (with s/pluggin/plugin in bonus). Comments welcome.
Regards,
--
Michael

Attachment Content-Type Size
20140829_logdec_error.patch text/x-diff 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-08-29 13:45:28 Re: Per table autovacuum vacuum cost limit behaviour strange
Previous Message Ali Akbar 2014-08-29 13:25:18 Re: [REVIEW] Re: Fix xpath() to return namespace definitions