Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Andres Freund
On 2014-09-03 11:23:21 -0400, Robert Haas wrote: > On Wed, Sep 3, 2014 at 11:06 AM, Andres Freund wrote: > >> >> 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 in

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 11:06 AM, Andres Freund wrote: >> >> 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. >> > >> > That level has no knowledge of what it's use

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Andres Freund
On 2014-09-03 10:59:17 -0400, Robert Haas wrote: > On Wed, Sep 3, 2014 at 10:45 AM, Andres Freund wrote: > > On 2014-09-03 09:36:32 -0400, Robert Haas wrote: > >> On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund > >> wrote: > >> > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote: > >> >> Hi all

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Robert Haas
On Wed, Sep 3, 2014 at 10:45 AM, Andres Freund wrote: > On 2014-09-03 09:36:32 -0400, Robert Haas wrote: >> On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund >> wrote: >> > On 2014-08-29 22:42:46 +0900, Michael Paquier wrote: >> >> Hi all, >> >> >> >> Using a plugin producing binary output, I came

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Andres Freund
On 2014-09-03 09:36:32 -0400, Robert Haas wrote: > On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund 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_c

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-09-03 Thread Robert Haas
On Fri, Aug 29, 2014 at 9:48 AM, Andres Freund 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 ca

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Michael Paquier
On Fri, Aug 29, 2014 at 11:15 PM, Andres Freund wrote: > > On top of that, a > > logical receiver receives data in textual form even if the decoder is > > marked as binary when getting a message with PQgetCopyData. > > I have no idea what you mean by that. The data is sent in the format the > out

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Michael Paquier
On Fri, Aug 29, 2014 at 11:39 PM, Andres Freund wrote: > Yes. The output plugin declares whether it requires the *output method* > to support binary data. pg_logical_slot_peek_changes *can not* support > binary data because it outputs data as > text. pg_logical_slot_peek_binary_changes *can* supp

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Andres Freund
On 2014-08-29 23:31:49 +0900, Michael Paquier wrote: > On Fri, Aug 29, 2014 at 11:15 PM, Andres Freund > wrote: > > > No, a textual output plugin is *NOT* allowed to produce binary > > output. That'd violate e.g. pg_logical_slot_peek_changes's return type > > because it's only declared to return

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Michael Paquier
On Fri, Aug 29, 2014 at 11:15 PM, Andres Freund wrote: > No, a textual output plugin is *NOT* allowed to produce binary > output. That'd violate e.g. pg_logical_slot_peek_changes's return type > because it's only declared to return text. > A textual output plugin can call pg_logical_slot_peek_bi

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Andres Freund
On 2014-08-29 23:07:44 +0900, Michael Paquier wrote: > On Fri, Aug 29, 2014 at 10:48 PM, Andres Freund > 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_logic

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Michael Paquier
On Fri, Aug 29, 2014 at 10:48 PM, Andres Freund 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 pl

Re: [HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Andres Freund
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_c

[HACKERS] Misleading error message in logical decoding for binary plugins

2014-08-29 Thread Michael Paquier
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 h