út 17. 9. 2019 v 10:01 odesílatel Mitar <mmitar@gmail.com> napsal:
Hi!
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. Text type "text" and binary type "bytea" is internally very similar.
But the message doesn't any info about type, so it should be ensure so clients understand to message and takes data in binary format.
You can overwrite pg_notify function for bytea format.
Is not possible to use NOTIFY with binary data, because this statement doesn't allow parametrization