Re: Feature request: binary NOTIFY - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Feature request: binary NOTIFY
Date
Msg-id CAFj8pRCyMQJMzPyOw=odH2MpQup7MHRb0U5OU1yCcCuJmU3zgg@mail.gmail.com
Whole thread Raw
In response to Re: Feature request: binary NOTIFY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


út 17. 9. 2019 v 16:10 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
Pavel Stehule <pavel.stehule@gmail.com> writes:
> út 17. 9. 2019 v 10:01 odesílatel Mitar <mmitar@gmail.com> napsal:
>> I might have missed prior discussions about this, but I wonder if it
>> would be possible to support binary payloads for NOTIFY/LISTEN? Again
>> and again I find it very limiting with just text (have to base64
>> encode data, or convert it to JSON).

> I think so is not any problem to pass binary data already.

Yeah it is ... the internal async-queue data structure assumes
null-terminated strings.  What's a lot worse, so does the
wire protocol's NotificationResponse message, as well as every
existing client that can read it.  (For instance, libpq's exposed
API for notify messages hands back the payload as a null-terminated
string.)  I don't think this is going to happen.

ok, thank you for correction.

Regards

Pavel

                        regards, tom lane

pgsql-hackers by date:

Previous
From: Ahsan Hadi
Date:
Subject: Re: patch: psql - enforce constant width of last column
Next
From: Pavel Stehule
Date:
Subject: Re: patch: psql - enforce constant width of last column