Re: Feature request: binary NOTIFY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Mitar <mmitar(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Feature request: binary NOTIFY
Date: 2019-09-17 14:10:01
Message-ID: 381.1568729401@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> út 17. 9. 2019 v 10:01 odesílatel Mitar <mmitar(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-09-17 14:38:37 Re: pgbench - allow to create partitioned tables
Previous Message Tomas Vondra 2019-09-17 13:34:20 Re: [proposal] de-TOAST'ing using a iterator